CVE-2024-52007

8.6 HIGH
XXE

📋 TL;DR

This CVE describes an XML External Entity (XXE) vulnerability in HAPI FHIR's XSLT parsing components. Attackers can submit malicious XML files containing external entity references to read arbitrary files from the host system. This affects systems where external clients can submit XML to HAPI FHIR implementations.

💻 Affected Systems

Products:
  • HAPI FHIR (org.hl7.fhir.core)
Versions: All versions before 6.4.0
Operating Systems: All operating systems running Java
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where external clients can submit XML to HAPI FHIR components using XSLT parsing. This is a regression from previous fixes in GHSA-6cr6-ph3p-f5rf.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through file disclosure of sensitive files like /etc/passwd, SSH keys, configuration files, or database credentials, potentially leading to lateral movement and data exfiltration.

🟠

Likely Case

Unauthorized reading of sensitive system files containing credentials, configuration data, or patient healthcare information (PHI) in healthcare systems.

🟢

If Mitigated

Limited impact with proper network segmentation, input validation, and XML parser hardening preventing successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires ability to submit XML to vulnerable endpoints. No public exploit code is known, but the vulnerability is straightforward to exploit given the XXE pattern.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 6.4.0

Vendor Advisory: https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-6cr6-ph3p-f5rf

Restart Required: Yes

Instructions:

1. Identify all HAPI FHIR deployments. 2. Check current version using dependency management tools. 3. Update org.hl7.fhir.core dependency to version 6.4.0 or later. 4. Rebuild and redeploy applications. 5. Restart affected services.

🧯 If You Can't Patch

  • Implement strict input validation to reject XML containing DOCTYPE declarations or external entity references.
  • Deploy network-level controls to restrict XML submission to trusted sources only and implement WAF rules to block XXE patterns.

🔍 How to Verify

Check if Vulnerable:

Check Maven/Gradle dependencies for org.hl7.fhir.core version <6.4.0. Review application code for XSLT parsing of external XML input.

Check Version:

mvn dependency:tree | grep org.hl7.fhir.core OR gradle dependencies | grep org.hl7.fhir.core

Verify Fix Applied:

Verify org.hl7.fhir.core dependency is version 6.4.0 or higher in build configuration files (pom.xml, build.gradle).

📡 Detection & Monitoring

Log Indicators:

  • Unusual XML parsing errors, large XML file submissions, requests containing DOCTYPE or SYSTEM entity declarations in XML payloads.

Network Indicators:

  • HTTP POST/PUT requests with XML content to FHIR endpoints, unusual file read patterns from application processes.

SIEM Query:

source="application_logs" AND (message="*DOCTYPE*" OR message="*ENTITY*" OR message="*XXE*")

🔗 References

📤 Share & Export