CVE-2018-1000632: Dom4j Dom4j Contains A XML Injection Vulnerability

HIGH
Advisory Identifier: GHSA-6pcc-3rfx-4gpm
CVSS 7.5
CWE-91
Published
Advisory Summary

CVE-2018-1000632 is a HIGH (CVSS 7.5) dom4j contains a xml injection vulnerability (CWE-91: XML Injection (aka Blind XPath Injection)) affecting Dom4j libraries in the Maven ecosystem. The issue involves dom4j contains a xml injection vulnerability. Remediation is available by upgrading affected packages to version 2.0.3, 2.1.1.

CVE-2018-1000632 at a Glance

CVE Identifier CVE-2018-1000632
GHSA Identifier GHSA-6pcc-3rfx-4gpm
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-91: XML Injection (aka Blind XPath Injection)
Affected Product Dom4j
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/I:H/A:N).

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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2018-1000632

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.1
<dependency>
    <groupId>org.dom4j</groupId>
    <artifactId>dom4j</artifactId>
    <version>2.1.1</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-2018-1000632, 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-91: XML Injection (aka Blind XPath Injection), where 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. 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 version prior to version 2.1.1 contains a CWE-91: XML Injection vulnerability in Class: Element. Methods: addElement, addAttribute that can result in an attacker tampering with XML documents through XML injection. This attack appear to be exploitable via an attacker specifying attributes or elements in the XML document. This vulnerability appears to have been fixed in 2.1.1 or later. 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-2018-1000632 Affected Dom4j Versions

3 component(s)
Fixed Versions:
2.0.32.1.1
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.1
All 1 versions
2.1.0
2.1.1
dom4j:dom4j
Maven
≤ 1.6.1

References

NVD — CVE-2018-1000632 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1000632
Dom4j Source Repository REPOSITORY
https://github.com/dom4j/dom4j/issues/48
Security Fix Commit FIX COMMIT
https://github.com/dom4j/dom4j/commit/e598eb43d418744c4dbf62f647dd2381c9ce9387
Security Fix Commit FIX COMMIT
https://github.com/dom4j/dom4j/commit/c2a99d7dee8ce7a4e5bef134bb781a6672bd8a0f
lists.apache.org/thread.html/708d941... WEB
https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E
lists.apache.org/thread.html/7e9e78f... WEB
https://lists.apache.org/thread.html/7e9e78f0e4288fac6591992836d2a80d4df19161e54bd71ab4b8e458@%3Cdev.maven.apache.org%3E
lists.apache.org/thread.html/7f6e120... WEB
https://lists.apache.org/thread.html/7f6e120e6ed473f4e00dde4c398fc6698eb383bd7857d20513e989ce@%3Cdev.maven.apache.org%3E
lists.apache.org/thread.html/9d4c1af... WEB
https://lists.apache.org/thread.html/9d4c1af6f702c3d6d6f229de57112ddccac8ce44446a01b7937ab9e0@%3Ccommits.maven.apache.org%3E
lists.apache.org/thread.html/d7d960b... WEB
https://lists.apache.org/thread.html/d7d960b2778e35ec9b4d40c8efd468c7ce7163bcf6489b633491c89f@%3Cdev.maven.apache.org%3E
lists.apache.org/thread.html/rb1b990... WEB
https://lists.apache.org/thread.html/rb1b990d7920ae0d50da5109b73b92bab736d46c9788dd4b135cb1a51@%3Cnotifications.freemarker.apache.org%3E
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/09/msg00028.html
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOOVVCRQE6ATFD2JM2EMDXOQXTRIVZGP
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJULAHVR3I5SX7OSMXAG75IMNSAYOXGA
Dom4j Security Information SECURITY
https://security.netapp.com/advisory/ntap-20190530-0001
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpuApr2021.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2020.html
Dom4j Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2020.html
Dom4j Security Information SECURITY
https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html
lists.apache.org/thread.html/5a020ec... WEB
https://lists.apache.org/thread.html/5a020ecaa3c701f408f612f7ba2ee37a021644c4a39da2079ed3ddbc@%3Ccommits.maven.apache.org%3E
lists.apache.org/thread.html/4a77652... WEB
https://lists.apache.org/thread.html/4a77652531d62299a30815cf5f233af183425db8e3c9a824a814e768@%3Cdev.maven.apache.org%3E
lists.apache.org/thread.html/00571f3... WEB
https://lists.apache.org/thread.html/00571f362a7a2470fba50a31282c65637c40d2e21ebe6ee535a4ed74@%3Ccommits.maven.apache.org%3E
ihacktoprotect.com/post/dom4j-xml-inje... WEB
https://ihacktoprotect.com/post/dom4j-xml-injection
Dom4j Source Repository REPOSITORY
https://github.com/dom4j/dom4j
GitHub Advisory / Wiki ADVISORY
https://github.com/advisories/GHSA-6pcc-3rfx-4gpm
access.redhat.com/errata/rhsa-2019:31... WEB
https://access.redhat.com/errata/RHSA-2019:3172
access.redhat.com/errata/rhsa-2019:11... WEB
https://access.redhat.com/errata/RHSA-2019:1162
access.redhat.com/errata/rhsa-2019:11... WEB
https://access.redhat.com/errata/RHSA-2019:1161
access.redhat.com/errata/rhsa-2019:11... WEB
https://access.redhat.com/errata/RHSA-2019:1160
access.redhat.com/errata/rhsa-2019:11... WEB
https://access.redhat.com/errata/RHSA-2019:1159
access.redhat.com/errata/rhsa-2019:03... WEB
https://access.redhat.com/errata/RHSA-2019:0380
access.redhat.com/errata/rhsa-2019:03... WEB
https://access.redhat.com/errata/RHSA-2019:0365
access.redhat.com/errata/rhsa-2019:03... WEB
https://access.redhat.com/errata/RHSA-2019:0364
access.redhat.com/errata/rhsa-2019:03... WEB
https://access.redhat.com/errata/RHSA-2019:0362

Frequently Asked Questions

What is CVE-2018-1000632?
CVE-2018-1000632 is a security vulnerability in Dom4j involving Dom4j contains a XML Injection vulnerability under CWE-91: XML Injection (aka Blind XPath Injection).
Which Dom4j versions are affected?
Affected versions include releases prior to 2.0.3, 2.1.1 across affected packages: org.dom4j:dom4j, dom4j:dom4j.
What version fixes CVE-2018-1000632?
Upgrading to 2.0.3, 2.1.1 (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.1, Latest secure release. Upgrade your dependency to 2.0.3, 2.1.1, Latest secure release or later.
What is the CVSS score of CVE-2018-1000632?
CVE-2018-1000632 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-1000632?
CVE-2018-1000632 is classified under 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.).
How can I check Maven dependencies for CVE-2018-1000632?
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-6pcc-3rfx-4gpm",
  "modified" : "2022-04-26T18:43:56Z",
  "published" : "2018-10-16T17:01:25Z",
  "aliases" : [ "CVE-2018-1000632" ],
  "summary" : "Dom4j contains a XML Injection vulnerability",
  "details" : "dom4j version prior to version 2.1.1 contains a CWE-91: XML Injection vulnerability in Class: Element. Methods: addElement, addAttribute that can result in an attacker tampering with XML documents through XML injection. This attack appear to be exploitable via an attacker specifying attributes or elements in the XML document. This vulnerability appears to have been fixed in 2.1.1 or later.\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:N/I:H/A:N"
  } ],
  "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.1"
      } ]
    } ],
    "versions" : [ "2.1.0" ]
  }, {
    "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-2018-1000632"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/issues/48"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/commit/e598eb43d418744c4dbf62f647dd2381c9ce9387"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j/commit/c2a99d7dee8ce7a4e5bef134bb781a6672bd8a0f"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/708d94141126eac03011144a971a6411fcac16d9c248d1d535a39451@%3Csolr-user.lucene.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/7e9e78f0e4288fac6591992836d2a80d4df19161e54bd71ab4b8e458@%3Cdev.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/7f6e120e6ed473f4e00dde4c398fc6698eb383bd7857d20513e989ce@%3Cdev.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/9d4c1af6f702c3d6d6f229de57112ddccac8ce44446a01b7937ab9e0@%3Ccommits.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/d7d960b2778e35ec9b4d40c8efd468c7ce7163bcf6489b633491c89f@%3Cdev.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rb1b990d7920ae0d50da5109b73b92bab736d46c9788dd4b135cb1a51@%3Cnotifications.freemarker.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/09/msg00028.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IOOVVCRQE6ATFD2JM2EMDXOQXTRIVZGP"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJULAHVR3I5SX7OSMXAG75IMNSAYOXGA"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20190530-0001"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuApr2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/technetwork/security-advisory/cpujan2019-5072801.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/5a020ecaa3c701f408f612f7ba2ee37a021644c4a39da2079ed3ddbc@%3Ccommits.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/4a77652531d62299a30815cf5f233af183425db8e3c9a824a814e768@%3Cdev.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/00571f362a7a2470fba50a31282c65637c40d2e21ebe6ee535a4ed74@%3Ccommits.maven.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://ihacktoprotect.com/post/dom4j-xml-injection"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dom4j/dom4j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-6pcc-3rfx-4gpm"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:3172"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1162"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1161"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1160"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1159"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0380"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0365"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0364"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0362"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-91" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:19:56Z",
    "nvd_published_at" : "2018-08-20T19:31:00Z"
  }
}