CyberSecBulletin
CVE-2024-52007NVD status: Deferred

org.hl7.fhir.core: Improper Restriction of XML External Entity Reference

CVE-2024-52007 is a high-severity improper restriction of XML external entity reference vulnerability in org.hl7.fhir.core from Hapifhir, with a CVSS 3.1 base score of 8.6 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected org.hl7.fhir.core versions: < 6.4.0. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.9% chance of exploitation within 30 days, higher than 60% of scored CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update hl7_fhir_core to 6.4.0 or a later version.
  2. Read the advisory on github.com for workarounds and exact fixed builds.
  3. Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.

Affected products and versions

VendorProductAffected versionsFixed in
Hapifhirorg.hl7.fhir.core< 6.4.0Not stated
Hapifhirhl7_fhir_corebefore 6.4.06.4.0

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
NetworkCan be exploited remotely over a network, including the internet.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
NoneNo account or login is needed.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
NoneNothing can be modified.
Availability
NoneAvailability is not affected.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N. Scored by CNA (github.com).

Official description

HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. XSLT parsing performed by various components are vulnerable to XML external entity injections. A processed XML file with a malicious DTD tag ( <!DOCTYPE foo [<!ENTITY example SYSTEM "/etc/passwd"> ]> could produce XML containing data from the host system. This impacts use cases where org.hl7.fhir.core is being used to within a host where external clients can submit XML. This is related to GHSA-6cr6-ph3p-f5rf, in which its fix (#1571 & #1717) was incomplete. This issue has been addressed in release version 6.4.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Improper Restriction of XML External Entity Reference

The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

How developers prevent this class of flaw

  • Many XML parsers and validators can be configured to disable external entity expansion.

More Improper Restriction of XML External Entity Reference vulnerabilities (CWE-611)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in org.hl7.fhir.core

All org.hl7.fhir.core vulnerabilities

Recent Improper Restriction of XML External Entity Reference vulnerabilities

Spotted an error? Tell us.