Hapifhir org.hl7.fhir.core
HAPI FHIR: XHTML narrative parser unbounded recursion causes StackOverflow denial of service
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.11, XhtmlParser.java imposes no maximum element nesting depth, so a deeply nested text.div narrative triggers unbounded recursion between parseElementInner() and parseElement(), raising a StackOverflowError. An attacker who can submit FHIR resources containing such narratives can thus crash a parsing or validation worker thread, affecting validator services and any application that parses attacker-supplied FHIR JSON or XML. This issue is fixed in version 6.9.11.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 6.9.11
Fixed in 6.9.11
- < 6.9.11
Fixed in 6.9.11
- < 6.9.11
Fixed in 6.9.11
- < 6.9.11
Fixed in 6.9.11
- < 6.9.11
Fixed in 6.9.11
Mitigation
Upgrade org.hl7.fhir.core to 6.9.11 or later.
Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 6.9.11 or later.
Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.utilities to 6.9.11 or later.
Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.11 or later.
Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli to 6.9.11 or later.
References
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.