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

Created at: Mar 9, 2026Updated at: Mar 9, 2026

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

Affected Package

Affecting fonttools package, versions
<4.62.0

Also affects

---

How to Fix

Upgrade
fonttools
to
4.62.0
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

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