CVE-2019-3773

9.8 CRITICAL

📋 TL;DR

This CVE describes an XML External Entity (XXE) injection vulnerability in Spring Web Services. It allows attackers to read arbitrary files, perform server-side request forgery, or cause denial of service by sending malicious XML payloads. Systems using vulnerable versions of Spring Web Services that process XML from untrusted sources are affected.

💻 Affected Systems

Products:
  • Spring Web Services
Versions: 2.4.3, 3.0.4, and older unsupported versions
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when processing XML from untrusted sources. Applications using default XML parsing configuration are at highest risk.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise including arbitrary file read, SSRF attacks, and potential remote code execution depending on server configuration.

🟠

Likely Case

Sensitive file disclosure (configuration files, credentials), internal network scanning via SSRF, and denial of service.

🟢

If Mitigated

Limited impact with proper input validation and XML parser hardening, potentially reduced to denial of service only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

XXE vulnerabilities are well-understood with many public exploits available. Exploitation requires sending XML payloads to vulnerable endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Spring Web Services 2.4.4, 3.0.5

Vendor Advisory: https://pivotal.io/security/cve-2019-3773

Restart Required: Yes

Instructions:

1. Update Spring Web Services to version 2.4.4 or 3.0.5 or later. 2. Update dependencies in your project configuration (Maven pom.xml or Gradle build.gradle). 3. Rebuild and redeploy your application. 4. Restart application servers.

🔧 Temporary Workarounds

Disable XXE in XML parsers

all

Configure XML parsers to disable external entity processing

Set XML parser properties: FEATURE_SECURE_PROCESSING = true, DISALLOW_DOCTYPE_DECL = true, EXTERNAL_GENERAL_ENTITIES = false, EXTERNAL_PARAMETER_ENTITIES = false, LOAD_EXTERNAL_DTD = false

Input validation and filtering

all

Validate and sanitize XML input before processing

Implement XML schema validation, filter DOCTYPE declarations, and validate against known good patterns

🧯 If You Can't Patch

  • Implement network-level controls to restrict XML input to trusted sources only
  • Deploy a web application firewall (WAF) with XXE protection rules

🔍 How to Verify

Check if Vulnerable:

Check Spring Web Services version in your application dependencies. If using Maven: mvn dependency:tree | grep spring-ws. If using Gradle: gradle dependencies | grep spring-ws.

Check Version:

mvn dependency:tree | grep -i "spring-ws\|spring-ws-core" or check pom.xml/gradle.build for version numbers

Verify Fix Applied:

Verify updated version appears in dependencies and test with XXE payloads to confirm they are rejected.

📡 Detection & Monitoring

Log Indicators:

  • XML parsing errors containing DOCTYPE or ENTITY declarations
  • Unusual file access patterns from web service processes
  • Outbound HTTP requests from server to internal systems

Network Indicators:

  • XML payloads containing DOCTYPE declarations or external entity references
  • Unusual XML content length or structure

SIEM Query:

web_service_logs WHERE (message CONTAINS "DOCTYPE" OR message CONTAINS "ENTITY") AND (status_code = 200 OR status_code = 400)

🔗 References

📤 Share & Export