XML Injection vulnerability in dom4j

dom4j Updated 02 Oct 2025

Summary

20/08/2018
N/A
Yes i
High
7.5

CVE-2018-1000632: dom4j version prior to version 2.1.1 contains a CWE-91: XML Injection vulnerability in Class: Element. Affects dom4j across 2 version ranges.

< 2.1.1-1 < e598eb43d418744c4dbf62f647dd2381c9ce9387

Fixed in 2.1.1-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

dom4j is an open-source library for working with XML documents in Java. It provides a simple and flexible API for parsing, manipulating, and generating XML. The library is widely used in various applications and frameworks that deal with XML data. However, versions prior to 2.1.1 are vulnerable to XML Injection.

Vulnerability Detail

The XML Injection vulnerability in dom4j allows an attacker to tamper with XML documents by injecting malicious attributes or elements. This can lead to various security issues, such as unauthorized access, data manipulation, or denial of service. The vulnerability has been assigned the CVE identifier CVE-2018-1000632 and has a CVSS score of 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

How To Fix

Minimum fixed version

2.1.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade dom4j

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the fixed version is not immediately feasible, you can mitigate the risk by implementing input validation and sanitization techniques when processing XML data. Ensure that all user-supplied input is properly validated and sanitized before being used in XML documents. This includes attributes, elements, and any other XML-related content.

Conclusion

The XML Injection vulnerability in dom4j can be a serious security risk if left unaddressed. It is crucial to upgrade to the fixed version or implement appropriate input validation and sanitization techniques to mitigate the risk. For further support and assistance in vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for dom4j →

Share this vulnerability

FAQ

XML Injection is a type of attack where an attacker injects malicious XML content into an application's XML processing routines. This can lead to various security vulnerabilities, such as unauthorized data access, data manipulation, or denial of service.

The XML Injection vulnerability in dom4j can be exploited by an attacker who can manipulate XML documents by injecting malicious attributes or elements. This can be done by providing specially crafted input to the vulnerable methods, such as addElement or addAttribute.

The XML Injection vulnerability can have serious consequences, including unauthorized access to sensitive data, data manipulation, or denial of service. An attacker could modify the structure or content of XML documents, leading to unexpected behavior or security breaches in the application.

Yes, the XML Injection vulnerability has been fixed in dom4j version 2.1.1 and later. It is recommended to upgrade to the latest version to ensure the security of your application.

If upgrading to the fixed version is not immediately feasible, you can mitigate the risk by implementing input validation and sanitization techniques when processing XML data. Ensure that all user-supplied input is properly validated and sanitized before being used in XML documents.

Related vulnerabilities

Recent vulnerabilities recorded for dom4j.

How To Fix

Minimum fixed version

2.1.1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade dom4j

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback