CWE-91: XML Injection (aka Blind XPath Injection)
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.
Last updated
Overview
Within XML, special elements could include reserved words or characters such as "<", ">", """, and "&", which could then be used to add new data or modify XML syntax.
Real-world CVEs
140 recorded CVEs are caused by CWE-91 (XML Injection (aka Blind XPath Injection)), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 40 new CWE-91 CVEs have been recorded so far in 2026 (11 in 2025).
- CVE-2020-0646CISA KEVCritical · CVSS 9.3 · EPSS 100th2020-01-14
- CVE-2021-4140Critical · CVSS 10.0 · EPSS 73th2022-12-22
- CVE-2026-103044
EasyTimeline should not serve image maps as application/xml
Critical · CVSS 9.8 · EPSS 38th2026-09-29 - CVE-2025-66034
fontTools is Vulnerable to Arbitrary File Write and XML injection in fontTools.varLib
Critical · CVSS 9.8 · EPSS 48th2025-11-29 - CVE-2024-51136Critical · CVSS 9.8 · EPSS 68th2024-11-04
- CVE-2023-43187Critical · CVSS 9.8 · EPSS 99th2023-09-26
- CVE-2019-19450
ReportLab vulnerable to remote code execution via paraparser
Critical · CVSS 9.8 · EPSS 93th2023-09-20 - CVE-2021-36020
Magento Commerce XML Injection Vulnerability In The 'City' Field Could Lead To Remote Code Execution
Critical · CVSS 9.8 · EPSS 86th2021-09-01 - CVE-2021-37154Critical · CVSS 9.8 · EPSS 72th2021-08-25
- CVE-2020-25216Critical · CVSS 9.8 · EPSS 84th2020-09-17
- CVE-2020-8479
ABB Central Licensing System - XML External Entity Injection
Critical · CVSS 9.8 · EPSS 83th2020-04-29 - CVE-2020-11535Critical · CVSS 9.8 · EPSS 84th2020-04-15
Showing 12 of 140 recorded CWE-91 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsCommon consequences
What can happen when CWE-91 is exploited.
Execute Unauthorized Code or Commands, Read Application Data, Modify Application Data
Affects: Confidentiality, Integrity, Availability
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-91, grouped by where in the lifecycle they apply.
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.
How to detect it
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Terminology & mappings
Mapped taxonomies
- PLOVER: XML injection (aka Blind Xpath injection)
- OWASP Top Ten 2007: Injection Flaws (A2) — CWE More Specific fit
- OWASP Top Ten 2004: Injection Flaws (A6) — CWE More Specific fit
- WASC: XML Injection (23)
- Software Fault Patterns: Tainted input to command (SFP24)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-91.
- What is CWE-91?
- 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.
- What CVEs are caused by CWE-91?
- 140 recorded CVEs are attributed to CWE-91, including CVE-2020-0646, CVE-2021-4140 and CVE-2026-103044. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- Is CWE-91 part of the OWASP Top 10?
- CWE-91 maps to OWASP Top Ten 2007: Injection Flaws (A2) in the OWASP security taxonomy.
- How do you prevent CWE-91?
- 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.
- How is CWE-91 detected?
- Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
- What are the consequences of CWE-91?
- Exploiting CWE-91 can lead to: Execute Unauthorized Code or Commands, Read Application Data, Modify Application Data.
- Is CWE-91 actively exploited?
- Yes. 1 CWE-91 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 140 recorded CVEs.
Sources
- [1]Blind XPath Injection (2004)
- [2]The Art of Software Security Assessment (2006)
References
- MITRE CWE definition (CWE-91) (opens in a new tab)
- CWE-91 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-91 CVEs
Get an alert when a new CWE-91 CVE affects your products, with AI-written analysis and remediation steps.