CVE-2018-15531

9.8 CRITICAL

📋 TL;DR

CVE-2018-15531 is an XML External Entity (XXE) vulnerability in JavaMelody's parseSoapMethodName function that allows attackers to read arbitrary files from the server filesystem or conduct server-side request forgery (SSRF) attacks. This affects all Java applications using JavaMelody monitoring library before version 1.74.0. The vulnerability is particularly dangerous because it can be exploited via SOAP requests to the monitoring endpoint.

💻 Affected Systems

Products:
  • JavaMelody
Versions: All versions before 1.74.0
Operating Systems: All operating systems running Java
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any Java application using JavaMelody for monitoring. The vulnerability is in the SOAP request parsing functionality of the monitoring endpoint.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete server compromise through file disclosure of sensitive files (passwords, keys, configuration), SSRF attacks against internal services, or potential remote code execution via file upload in some configurations.

🟠

Likely Case

Unauthorized reading of sensitive server files, disclosure of application credentials, and potential access to internal network resources via SSRF.

🟢

If Mitigated

Limited impact if proper network segmentation, file system permissions, and input validation are in place, though XXE vulnerabilities remain serious.

🌐 Internet-Facing: HIGH - JavaMelody monitoring endpoints are often exposed, and the vulnerability requires no authentication by default.
🏢 Internal Only: HIGH - Even internal attackers or compromised internal systems can exploit this to escalate privileges and move laterally.

🎯 Exploit Status

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

Public exploit details are available in security advisories. The vulnerability is straightforward to exploit with standard XXE payloads targeting the SOAP endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.74.0

Vendor Advisory: https://github.com/javamelody/javamelody/wiki/ReleaseNotes

Restart Required: Yes

Instructions:

1. Update JavaMelody dependency to version 1.74.0 or later in your project's build configuration (Maven, Gradle, etc.). 2. Rebuild and redeploy your application. 3. Restart the application server to ensure the new version is loaded.

🔧 Temporary Workarounds

Disable XML external entity processing

all

Configure XML parsers to disable external entity resolution

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

Restrict access to JavaMelody endpoint

linux

Block external access to /monitoring endpoint using firewall or web server configuration

iptables -A INPUT -p tcp --dport [app-port] -m string --string "/monitoring" --algo bm -j DROP
Add web server rewrite rule to block /monitoring/* paths

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate affected systems from sensitive internal resources
  • Deploy a web application firewall (WAF) with XXE protection rules to block malicious SOAP requests

🔍 How to Verify

Check if Vulnerable:

Check your project's dependency management file (pom.xml, build.gradle) for JavaMelody version. If version is below 1.74.0, you are vulnerable. Also check if /monitoring endpoint responds to SOAP requests with XXE payloads.

Check Version:

Check Maven: mvn dependency:tree | grep javamelody. Check Gradle: gradle dependencies | grep javamelody. Or check application's classpath for javamelody jar version.

Verify Fix Applied:

Verify JavaMelody version is 1.74.0 or higher in deployed application. Test the /monitoring endpoint with XXE payloads to confirm they are rejected.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SOAP requests to /monitoring endpoint
  • XML parsing errors containing external entity references
  • File read attempts from unexpected paths in application logs

Network Indicators:

  • HTTP requests to /monitoring with XML content containing SYSTEM or PUBLIC DTD declarations
  • Outbound connections from application server to internal services following SSRF patterns

SIEM Query:

source="application.log" AND ("/monitoring" AND ("SYSTEM" OR "PUBLIC" OR "<!ENTITY")) OR (destination_port=80 OR destination_port=443) AND source_ip=[app-server] AND NOT destination_ip IN [allowed-external]

🔗 References

📤 Share & Export