CVE-2021-1628

9.8 CRITICAL

📋 TL;DR

CVE-2021-1628 is an XML External Entity (XXE) vulnerability in Mule runtime that allows attackers to read arbitrary files from the server or perform server-side request forgery (SSRF). This affects MuleSoft customers using Mule 4.x runtime versions released before February 2, 2021, in both CloudHub and on-premise deployments.

💻 Affected Systems

Products:
  • Mule Runtime
  • MuleSoft Anypoint Platform
Versions: Mule 4.x runtime versions released before February 2, 2021
Operating Systems: All platforms running Mule runtime
Default Config Vulnerable: ⚠️ Yes
Notes: Affects both CloudHub (SaaS) and on-premise deployments. Mule 3.x is not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise including sensitive file disclosure, internal network reconnaissance, and potential remote code execution through XXE-based attacks.

🟠

Likely Case

Unauthorized access to sensitive files (configuration files, credentials, source code) and potential SSRF attacks against internal services.

🟢

If Mitigated

Limited impact with proper XML parser hardening and network segmentation preventing file access and SSRF.

🌐 Internet-Facing: HIGH - Internet-facing Mule applications can be directly exploited without authentication.
🏢 Internal Only: MEDIUM - Internal applications still vulnerable but require internal network access.

🎯 Exploit Status

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

XXE vulnerabilities are well-understood with many public exploit examples. Exploitation typically requires sending malicious XML payloads to vulnerable endpoints.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Mule 4.x runtime versions released on or after February 2, 2021

Vendor Advisory: https://help.salesforce.com/articleView?id=000357384&type=1&mode=1

Restart Required: Yes

Instructions:

1. Upgrade to Mule 4.x runtime version released on or after February 2, 2021. 2. Update all Mule applications to use the patched runtime. 3. Restart Mule runtime instances. 4. Verify no applications are using vulnerable XML parsers.

🔧 Temporary Workarounds

XML Parser Hardening

all

Configure XML parsers to disable external entity processing and DTD processing

Configure XMLInputFactory properties: XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES = false
Set XMLInputFactory.SUPPORT_DTD = false
Use secure XML parser configurations in Mule configuration files

Input Validation

all

Implement XML schema validation and input filtering for XML endpoints

Add XML schema validation to all XML processing endpoints
Implement input filtering to reject XML containing DOCTYPE declarations

🧯 If You Can't Patch

  • Implement network segmentation to isolate Mule runtime from sensitive internal systems
  • Deploy web application firewall (WAF) with XXE protection rules to block malicious XML payloads

🔍 How to Verify

Check if Vulnerable:

Check Mule runtime version: If using Mule 4.x version released before February 2, 2021, the system is vulnerable. Test with XXE payloads against XML endpoints.

Check Version:

Check Mule runtime version in Anypoint Runtime Manager or via Mule CLI: mule -version

Verify Fix Applied:

Verify Mule runtime version is February 2, 2021 or later. Test XML endpoints with XXE payloads to confirm they are rejected.

📡 Detection & Monitoring

Log Indicators:

  • XML parsing errors containing 'DOCTYPE' or 'ENTITY'
  • Unusual file access patterns from Mule runtime process
  • HTTP requests to internal resources from Mule runtime

Network Indicators:

  • XML payloads containing external entity references in HTTP requests
  • Outbound connections from Mule runtime to unexpected internal services

SIEM Query:

source="mule-runtime" AND (message="*DOCTYPE*" OR message="*ENTITY*" OR message="*XXE*")

🔗 References

📤 Share & Export