Vulnerabilities in pkg:maven/org.apache.xmlbeans/xmlbeans

PACKAGE
Advisory Identifier: GHSA-mw3r-pfmg-xp92
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.xmlbeans/xmlbeans

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.xmlbeans/xmlbeans. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mw3r-pfmg-xp92 CVE-2021-23926 CRITICAL Improper Restriction of Recursive Entity References in Apache XMLBeans

CVE-2021-23926 at a Glance

CVE Identifier CVE-2021-23926
GHSA Identifier GHSA-mw3r-pfmg-xp92
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Xmlbeans
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability High (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.

org.apache.xmlbeans:xmlbeans fixed: 3.0.0
<dependency>
    <groupId>org.apache.xmlbeans</groupId>
    <artifactId>xmlbeans</artifactId>
    <version>3.0.0</version>
</dependency>
Verify Direct and Transitive Dependencies

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

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.

CVE-2021-23926 Affected Xmlbeans Versions

1 component(s)
Fixed Versions:
3.0.0
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?
CVE-2021-23926 is a security vulnerability in Xmlbeans involving Improper Restriction of Recursive Entity References in Apache XMLBeans under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Xmlbeans versions are affected?
Affected versions include releases prior to 3.0.0 across affected packages: org.apache.xmlbeans:xmlbeans.
What version fixes CVE-2021-23926?
Upgrading to 3.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xmlbeans affected?
Yes, org.apache.xmlbeans:xmlbeans is affected in releases prior to 3.0.0. Upgrade your dependency to 3.0.0 or later.
What is the CVSS score of CVE-2021-23926?
CVE-2021-23926 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H.
What CWE is associated with CVE-2021-23926?
CVE-2021-23926 is classified under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion') (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.).
How can I check Maven dependencies for CVE-2021-23926?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.xmlbeans'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}