CVE-2020-10683: Dom4j Dom4j Allows External Entities By Vulnerability

CRITICAL
Advisory Identifier: GHSA-hwj3-m3p6-hj38
CVSS 9.8
CWE-611
Published
Advisory Summary

CVE-2020-10683 is a CRITICAL (CVSS 9.8) dom4j allows external entities by vulnerability (CWE-611: Improper Restriction of XML External Entity Reference) affecting Dom4j libraries in the Maven ecosystem. The issue involves dom4j allows external entities by default which might enable xxe attacks. Remediation is available by upgrading affected packages to version 2.0.3, 2.1.3.

CVE-2020-10683 at a Glance

CVE Identifier CVE-2020-10683
GHSA Identifier GHSA-hwj3-m3p6-hj38
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-611: Improper Restriction of XML External Entity Reference
Affected Product Dom4j
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/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 High (I:H)
Availability High (A:H)

How to Fix CVE-2020-10683

To remediate this vulnerability, upgrade all affected Dom4j 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: 2.0.3
<dependency>
    <groupId>org.dom4j</groupId>
    <artifactId>dom4j</artifactId>
    <version>2.0.3</version>
</dependency>
org.dom4j:dom4j fixed: 2.1.3
<dependency>
    <groupId>org.dom4j</groupId>
    <artifactId>dom4j</artifactId>
    <version>2.1.3</version>
</dependency>
dom4j:dom4j fixed: Latest secure release
<dependency>
    <groupId>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-2020-10683, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.dom4j

Analyze the terminal output to locate any version of Dom4j in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.3), 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-611: Improper Restriction of XML External Entity Reference, where the product processes an xml document that can contain xml entities with uris that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output. In Dom4j, 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

dom4j before 2.1.3 allows external DTDs and External Entities by default, which might enable XXE attacks. However, there is popular external documentation from OWASP showing how to enable the safe, non-default behavior in any application that uses dom4j. 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.

CVE-2020-10683 Affected Dom4j Versions

3 component(s)
Fixed Versions:
2.0.32.1.3
Product / Package Ecosystem Affected Versions Fixed Version
org.dom4j:dom4j
Maven
< 2.0.3
2.0.3
org.dom4j:dom4j
Maven
≥ 2.1.0
< 2.1.3
2.1.3
dom4j:dom4j
Maven
≤ 1.6.1

References

NVD — CVE-2020-10683 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-10683
Dom4j Source Repository REPOSITORY
https://github.com/dom4j/dom4j/issues/87
Security Fix Commit FIX COMMIT
https://github.com/dom4j/dom4j/commit/1707bf3d898a8ada3b213acb0e3b38f16eaae73d
Security Fix Commit FIX COMMIT
https://github.com/dom4j/dom4j/commit/a8228522a99a02146106672a34c104adbda5c658
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2021.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2022.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2022.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpujan2021.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Dom4j Security Information SECURITY
https://www.oracle.com//security-alerts/cpujul2021.html
usn.ubuntu.com/4575-1 WEB
https://usn.ubuntu.com/4575-1
Dom4j Security Information SECURITY
https://security.netapp.com/advisory/ntap-20200518-0002
lists.apache.org/thread.html/rb1b990... WEB
https://lists.apache.org/thread.html/rb1b990d7920ae0d50da5109b73b92bab736d46c9788dd4b135cb1a51@%3Cnotifications.freemarker.apache.org%3E
lists.apache.org/thread.html/r91c64c... WEB
https://lists.apache.org/thread.html/r91c64cd51e68e97d524395474eaa25362d564572276b9917fcbf5c32@%3Cdev.velocity.apache.org%3E
lists.apache.org/thread.html/r51f3f9... WEB
https://lists.apache.org/thread.html/r51f3f9801058e47153c0ad9bc6209d57a592fc0e7aefd787760911b8@%3Cdev.velocity.apache.org%3E
Dom4j Release RELEASE
https://github.com/dom4j/dom4j/releases/tag/version-2.1.3
Dom4j Source Repository REPOSITORY
https://github.com/dom4j/dom4j/commits/version-2.0.3
Dom4j Source Repository REPOSITORY
https://github.com/dom4j/dom4j
cheatsheetseries.owasp.org/cheatsheets/xml_ext... WEB
https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=1694235
Dom4j Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00061.html

Frequently Asked Questions

What is CVE-2020-10683?
CVE-2020-10683 is a security vulnerability in Dom4j involving dom4j allows External Entities by default which might enable XXE attacks under CWE-611: Improper Restriction of XML External Entity Reference.
Which Dom4j versions are affected?
Affected versions include releases prior to 2.0.3, 2.1.3 across affected packages: org.dom4j:dom4j, dom4j:dom4j.
What version fixes CVE-2020-10683?
Upgrading to 2.0.3, 2.1.3 (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 2.0.3, 2.1.3, Latest secure release. Upgrade your dependency to 2.0.3, 2.1.3, Latest secure release or later.
What is the CVSS score of CVE-2020-10683?
CVE-2020-10683 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-10683?
CVE-2020-10683 is classified under CWE-611: Improper Restriction of XML External Entity Reference (The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.).
How can I check Maven dependencies for CVE-2020-10683?
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-hwj3-m3p6-hj38",
  "modified" : "2022-02-08T22:06:12Z",
  "published" : "2020-06-05T16:13:36Z",
  "aliases" : [ "CVE-2020-10683" ],
  "summary" : "dom4j allows External Entities by default which might enable XXE attacks",
  "details" : "dom4j before 2.1.3 allows external DTDs and External Entities by default, which might enable XXE attacks. However, there is popular external documentation from OWASP showing how to enable the safe, non-default behavior in any application that uses dom4j.\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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.dom4j:dom4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.dom4j:dom4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "dom4j:dom4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-10683"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/issues/87"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/commit/1707bf3d898a8ada3b213acb0e3b38f16eaae73d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/commit/a8228522a99a02146106672a34c104adbda5c658"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com//security-alerts/cpujul2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4575-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20200518-0002"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rb1b990d7920ae0d50da5109b73b92bab736d46c9788dd4b135cb1a51@%3Cnotifications.freemarker.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r91c64cd51e68e97d524395474eaa25362d564572276b9917fcbf5c32@%3Cdev.velocity.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r51f3f9801058e47153c0ad9bc6209d57a592fc0e7aefd787760911b8@%3Cdev.velocity.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/releases/tag/version-2.1.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/commits/version-2.0.3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dom4j/dom4j"
  }, {
    "type" : "WEB",
    "url" : "https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1694235"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00061.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-611" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-04T19:38:22Z",
    "nvd_published_at" : "2020-05-01T19:15:00Z"
  }
}