PyPI: fonttools
SFTY-20260309-88197
Safety legacy ID: pyup.io-88739
Affected versions of the fonttools package are vulnerable to Arbitrary Code Execution due to the use of Python's unsafe eval() built-in when parsing TTX font data. The parseBlendList() function in fonttools.cffLib called Python's eval() directly on unsanitized numeric value strings extracted from TTX XML attributes, rather than using the project's own restricted safeEval() utility, which limits evaluation to safe literal types. https://github.com/fonttools/fonttools/commit/9caa12715c17ca5b846c6a640aaa5d3503fdbaa2
Overview
Affected versions of the fonttools package are vulnerable to Arbitrary Code Execution due to the use of Python's unsafe eval() built-in when parsing TTX font data. The parseBlendList() function in fonttools.cffLib called Python's eval() directly on unsanitized numeric value strings extracted from TTX XML attributes, rather than using the project's own restricted safeEval() utility, which limits evaluation to safe literal types. https://github.com/fonttools/fonttools/commit/9caa12715c17ca5b846c6a640aaa5d3503fdbaa2
Advisory
Affected versions of the fonttools package are vulnerable to Arbitrary Code Execution due to the use of Python's unsafe eval() built-in when parsing TTX font data. The parseBlendList() function in fonttools.cffLib called Python's eval() directly on unsanitized numeric value strings extracted from TTX XML attributes, rather than using the project's own restricted safeEval() utility, which limits evaluation to safe literal types. https://github.com/fonttools/fonttools/commit/9caa12715c17ca5b846c6a640aaa5d3503fdbaa2
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more