Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. fonttools
  4. ›
  5. CVE-2025-66034

CVE-2025-66034: fontTools is Vulnerable to Arbitrary File Write and XML injection in fontTools.varLib

December 1, 2025

The fonttools varLib (or python3 -m fontTools.varLib) script has an arbitrary file write vulnerability that leads to remote code execution when a malicious .designspace file is processed. The vulnerability affects the main() code path of fontTools.varLib, used by the fonttools varLib CLI and any code that invokes fontTools.varLib.main().

The vulnerability exists due to unsanitised filename handling combined with content injection. Attackers can write files to arbitrary filesystem locations via path traversal sequences, and inject malicious code (like PHP) into the output files through XML injection in labelname elements. When these files are placed in web-accessible locations and executed, this achieves remote code execution without requiring any elevated privileges. Once RCE is obtained, attackers can further escalate privileges to compromise system files (like overwriting /etc/passwd).

Overall this allows attackers to:

  • Write font files to arbitrary locations on the filesystem
  • Overwrite configuration files
  • Corrupt application files and dependencies
  • Obtain remote code execution

The attacker controls the file location, extension and contents which could lead to remote code execution as well as enabling a denial of service through file corruption means.

References

  • github.com/advisories/GHSA-768j-98cg-p3fv
  • github.com/fonttools/fonttools
  • github.com/fonttools/fonttools/commit/a696d5ba93270d5954f98e7cab5ddca8a02c1e32
  • github.com/fonttools/fonttools/security/advisories/GHSA-768j-98cg-p3fv
  • nvd.nist.gov/vuln/detail/CVE-2025-66034

Code Behaviors & Features

Detect and mitigate CVE-2025-66034 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.33.0 before 4.60.2

Fixed versions

  • 4.60.2

Solution

Upgrade to version 4.60.2 or above.

Impact 6.3 MEDIUM

CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-91: XML Injection (aka Blind XPath Injection)

Source file

pypi/fonttools/CVE-2025-66034.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 09 Dec 2025 00:18:34 +0000.