CVE-2021-23926: Xmlbeans Improper Restriction Of Recursive Entity Vulnerability
CRITICALCVE-2021-23926 is a CRITICAL (CVSS 9.1) improper restriction of recursive entity vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Xmlbeans libraries in the Maven ecosystem. The issue involves improper restriction of recursive entity references in apache xmlbeans. Remediation is available by upgrading affected packages to version 3.0.0.
CVE-2021-23926 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2021-23926
To remediate this vulnerability, upgrade all affected Xmlbeans dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>3.0.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.apache.xmlbeans
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-23926, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.apache.xmlbeans
Analyze the terminal output to locate any version of Xmlbeans in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.apache.xmlbeans command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion'), where the product uses xml documents and allows their structure to be defined with a document type definition (dtd), but it does not properly control the number of recursive definitions of entities. In Xmlbeans, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-23926 Affected Xmlbeans Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.xmlbeans:xmlbeans
|
Maven |
< 3.0.0
|
3.0.0
|
References
Frequently Asked Questions
What is CVE-2021-23926?
Which Xmlbeans versions are affected?
What version fixes CVE-2021-23926?
Is xmlbeans affected?
What is the CVSS score of CVE-2021-23926?
What CWE is associated with CVE-2021-23926?
How can I check Maven dependencies for CVE-2021-23926?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mw3r-pfmg-xp92",
"modified" : "2021-10-21T18:58:58Z",
"published" : "2021-06-16T17:37:11Z",
"aliases" : [ "CVE-2021-23926" ],
"summary" : "Improper Restriction of Recursive Entity References in Apache XMLBeans",
"details" : "The XML parsers used by XMLBeans up to version 2.6.0 did not set the properties needed to protect the user from malicious XML input. Vulnerabilities include possibilities for XML Entity Expansion attacks. Affects XMLBeans up to and including v2.6.0.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.xmlbeans:xmlbeans"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23926"
}, {
"type" : "WEB",
"url" : "https://issues.apache.org/jira/browse/XMLBEANS-517"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/r2dc5588009dc9f0310b7382269f932cc96cae4c3901b747dda1a7fed@%3Cjava-dev.axis.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread.html/rbb01d10512098894cd5f22325588197532c64f1c818ea7e4120d40c1@%3Cjava-dev.axis.apache.org%3E"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/06/msg00024.html"
}, {
"type" : "WEB",
"url" : "https://poi.apache.org"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20210513-0004"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
}, {
"type" : "WEB",
"url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-776" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-04-06T21:33:29Z",
"nvd_published_at" : "2021-01-14T15:15:00Z"
}
}