CVE-2020-10683

9.8 CRITICAL

📋 TL;DR

This vulnerability in dom4j XML parser allows XML External Entity (XXE) attacks by default, enabling attackers to read arbitrary files, perform server-side request forgery, or cause denial of service. It affects applications using dom4j versions before 2.0.3 or 2.1.x before 2.1.3 that process untrusted XML input. The high CVSS score reflects the potential for complete system compromise.

💻 Affected Systems

Products:
  • dom4j
  • Applications using dom4j library
Versions: dom4j before 2.0.3 and 2.1.x before 2.1.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that process XML from untrusted sources. The vulnerability exists in default parser configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise via file disclosure, SSRF leading to internal network access, or denial of service through entity expansion attacks.

🟠

Likely Case

Arbitrary file read from the server filesystem, potentially exposing sensitive configuration files, credentials, or application source code.

🟢

If Mitigated

No impact if proper XXE prevention is implemented via secure parser configuration or input validation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

XXE attacks are well-documented with public exploit examples. Exploitation requires the application to process attacker-controlled XML.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: dom4j 2.0.3 or 2.1.3

Vendor Advisory: https://github.com/dom4j/dom4j/commits/version-2.0.3

Restart Required: Yes

Instructions:

1. Update dom4j dependency to version 2.0.3 or 2.1.3. 2. Update pom.xml or build.gradle with new version. 3. Rebuild and redeploy application. 4. Restart application server.

🔧 Temporary Workarounds

Configure SAXReader for XXE prevention

all

Manually configure dom4j SAXReader to disable external entities and DTDs

SAXReader reader = new SAXReader();
reader.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
reader.setFeature("http://xml.org/sax/features/external-general-entities", false);
reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false);

🧯 If You Can't Patch

  • Implement XML input validation to reject XML containing DOCTYPE declarations
  • Use XML schema validation to restrict allowed XML structures and prevent XXE payloads

🔍 How to Verify

Check if Vulnerable:

Check application dependencies for dom4j versions before 2.0.3 or 2.1.x before 2.1.3

Check Version:

mvn dependency:tree | grep dom4j OR gradle dependencies | grep dom4j

Verify Fix Applied:

Verify dom4j version is 2.0.3 or higher, or 2.1.3 or higher for 2.1.x branch

📡 Detection & Monitoring

Log Indicators:

  • XML parsing errors mentioning external entities
  • Unexpected file read operations during XML processing
  • HTTP requests to internal resources triggered by XML parsing

Network Indicators:

  • Outbound HTTP requests from application server during XML processing
  • DNS requests for external entities defined in XML

SIEM Query:

source="application.logs" AND ("DOCTYPE" OR "ENTITY" OR "SYSTEM") AND "xml"

🔗 References

📤 Share & Export