CVE-2023-45139 is a high severity XML external entity flaw in the Python library fontTools, scored 7.5. It affects versions from 4.28.2 up to but not including 4.43.0 and is fixed in 4.43.0. Upgrade with pip and check any service that subsets user supplied fonts.
What's affected
The GitHub advisory GHSA-6673-4983-2vx5, published on 9 January 2024, lists the pip package fonttools as affected from 4.28.2 up to but not including 4.43.0, with 4.43.0 as the patched version. The NVD record says the same fix version. The NVD record was published on 2024-01-10.
NVD scores it 7.5 with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, and the GitHub advisory rates it High, so the sources agree on severity.
The flaw is in the subsetting module. When it parses an OT-SVG font, which carries an SVG table, it resolves entities declared in the font. The advisory says this lets a crafted font pull in files from the file system of the host running fontTools, or cause the host to make web requests.
Only code that subsets fonts it did not create is in the path. Applications that merely load fonts for other purposes do not call the affected subsetting code for SVG tables, though you should still upgrade.
Weakness class: CWE-611 (XML external entity reference).
How to check if you're exposed
Check the installed version in each environment:
pip show fonttools
pip list | grep -i fonttools
A version from 4.28.2 to 4.42.x is in the affected range. For projects with lock files, search them for fonttools:
grep -ri "fonttools" requirements*.txt poetry.lock Pipfile.lock 2>/dev/null
fontTools is often a transitive dependency, pulled in by tools such as matplotlib and other graphics libraries, so look in container images and virtual environments, not just your direct requirements.
What to do now
- Find every project, container image and environment that includes fonttools, including indirect uses.
- Upgrade to fonttools 4.43.0 or later and rebuild lock files and images.
- Re-run your tests, since the fix changes how entities in OT-SVG data are parsed.
- Identify services that accept fonts from users and subset them. Treat those as highest priority.
- Run fonts from untrusted sources through processing with the least file system and network access you can give it.
Why it matters
XML external entity injection, tracked as CWE-611, happens when an XML parser is allowed to resolve entities that point at files or URLs. The fix in the upstream commit is a single option on the parser that turns entity resolution off for OT-SVG data. The commit message explains that entities are not expected in OT-SVG, so nothing legitimate is lost.
The risk depends on how the library is used. A build script that subsets your own fonts is not at risk from a crafted file. A web service that takes uploaded fonts is. That difference is a reachability question, and a dependency scan that only reports the library version cannot answer it. CVE-2023-45139 is not on the CISA Known Exploited Vulnerabilities list, and none of the pages I read says it has been exploited in the wild. That is a statement about what is recorded, not a reason to delay.
Safeguard's free in-browser dependency scan lists fonttools in a project's dependency tree, including indirect uses, so you can find where to upgrade.
Try it yourself
Click through it at your own pace, or open it full screen.
Quick check
Which fontTools version fixes CVE-2023-45139?
Version 4.43.0. Versions from 4.28.2 up to but not including 4.43.0 are affected.
Am I affected if fontTools is only an indirect dependency?
The library is present, but the flaw is reached only if code subsets OT-SVG fonts from untrusted input. Upgrade regardless.
Sources
- Gold entry for CVE-2023-45139
- GitHub advisory GHSA-6673-4983-2vx5
- fontTools 4.43.0 release
- Upstream fix commit
Last reviewed: 19 October 2026.