Vulnerabilities in pkg:maven/org.dom4j/dom4j

PACKAGE
Advisory Identifier: GHSA-fgq9-fc3q-vqmw
Advisory Summary

CVE-2023-45960 is a MODERATE dom4j xml entity expansion vulnerability vulnerability (CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')) affecting Withdrawn Advisory libraries in the Maven ecosystem. The issue involves dom4j xml entity expansion vulnerability. Remediation is available in the latest vendor maintenance releases.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.dom4j/dom4j

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-fgq9-fc3q-vqmw CVE-2023-45960 MODERATE Withdrawn Advisory: dom4j XML Entity Expansion vulnerability
GHSA-6pcc-3rfx-4gpm CVE-2018-1000632 HIGH Dom4j contains a XML Injection vulnerability
GHSA-hwj3-m3p6-hj38 CVE-2020-10683 CRITICAL dom4j allows External Entities by default which might enable XXE attacks

CVE-2023-45960 at a Glance

CVE Identifier CVE-2023-45960
GHSA Identifier GHSA-fgq9-fc3q-vqmw
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
Affected Product Withdrawn Advisory
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2023-45960

To remediate this vulnerability, upgrade all affected Withdrawn Advisory 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.dom4j:dom4j fixed: Latest secure release
<dependency>
    <groupId>org.dom4j</groupId>
    <artifactId>dom4j</artifactId>
    <version>Latest secure release</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.dom4j

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-45960, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.dom4j

Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.dom4j 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 Withdrawn Advisory, 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

## Withdrawn Advisory This advisory has been withdrawn because [the underlying vulnerability could not be reproduced](https://github.com/joker-xiaoyan/XXE-SAXReader/issues/1#issuecomment-1783780581). This link is maintained to preserve external references. ## Original Description An issue in dom4.j org.dom4.io.SAXReader v.2.1.4 and before allows a remote attacker to obtain sensitive information via the setFeature function.

CVE-2023-45960 Affected Withdrawn Advisory Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
org.dom4j:dom4j
Maven
≤ 2.1.4

References

Frequently Asked Questions

What is CVE-2023-45960?
CVE-2023-45960 is a security vulnerability in Withdrawn Advisory involving dom4j XML Entity Expansion vulnerability under CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion').
Which Withdrawn Advisory versions are affected?
Affected versions include releases prior to current release patches across affected packages: org.dom4j:dom4j.
What version fixes CVE-2023-45960?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is dom4j affected?
Yes, org.dom4j:dom4j is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2023-45960?
CVE-2023-45960 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-2023-45960?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.dom4j'. 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-fgq9-fc3q-vqmw",
  "modified" : "2023-10-31T20:21:23Z",
  "published" : "2023-10-25T18:32:23Z",
  "withdrawn" : "2023-10-31T20:21:23Z",
  "aliases" : [ "CVE-2023-45960" ],
  "summary" : "Withdrawn Advisory: dom4j XML Entity Expansion vulnerability",
  "details" : "## Withdrawn Advisory\nThis advisory has been withdrawn because [the underlying vulnerability could not be reproduced](https://github.com/joker-xiaoyan/XXE-SAXReader/issues/1#issuecomment-1783780581). This link is maintained to preserve external references.\n\n## Original Description\nAn issue in dom4.j org.dom4.io.SAXReader v.2.1.4 and before allows a remote attacker to obtain sensitive information via the setFeature function.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.dom4j:dom4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.1.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45960"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/issues/171#issuecomment-1781547256"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/joker-xiaoyan/XXE-SAXReader/issues/1"
  }, {
    "type" : "WEB",
    "url" : "https://dom4j.github.io"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dom4j/dom4j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/joker-xiaoyan/XXE-SAXReader/blob/8c0d24f9800c36c8ad36457c1df1e4aaff24c7b9/POC.java"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/joker-xiaoyan/XXE-SAXReader/tree/main"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-776" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-27T19:50:41Z",
    "nvd_published_at" : "2023-10-25T18:17:35Z"
  }
}