CVE-2026-81876
largeInfinite-loop DoS in HAPI FHIR Smart Health Card JWT parser
HAPI FHIR before version 6.9.12 contains an infinite-loop flaw in SHCParser (org.hl7.fhir.r5), which decompresses Smart Health Card JWTs: when the JWT header specifies zip: "DEF" and the raw DEFLATE payload is empty or truncated, java.util.zip.Inflater can report zero bytes inflated while never reaching a finished or needsInput-consuming state that ends the loop, and the loop also omits a needsDictionary() termination check; the same zero-progress pattern exists in SHCParser.decompress(). The SHC parsing path is reachable from ResourceChecker.java during file-format detection and from validation of Smart Health Cards, so a single unauthenticated, malformed validation request can pin one JVM worker thread indefinitely. An attacker sending multiple concurrent malformed requests can exhaust all validation worker threads, causing a full denial of service on the FHIR server (CVSS availability impact high, no confidentiality or integrity impact). Any deployment of HAPI FHIR prior to 6.9.12 that exposes validation or content-detection endpoints handling attacker-supplied payloads is affected. No public proof-of-concept is known and the flaw is not listed in CISA KEV, so exploitation is not currently confirmed in the wild.
What to do: Upgrade HAPI FHIR to version 6.9.12 or later, which fixes the loop termination conditions in SHCParser. If upgrading is not immediately possible, restrict or rate-limit access to FHIR $validate and any endpoints that accept arbitrary content for format detection, and block or closely monitor requests containing Smart Health Card JWTs with DEFLATE-compressed payloads. Check exposed instances for signs of validation-worker thread exhaustion (hung worker threads, stalled validation requests).
| HAPI FHIR (org.hl7.fhir.r5 SHCParser / Smart Health Card parsing) | All versions prior to 6.9.12 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to version 6.9.12, SHCParser in org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/SHCParser.java can enter an infinite loop while processing attacker-controlled Smart Health Card JWT content whose header contains zip: "DEF" and whose raw-DEFLATE payload is empty or truncated. SHCParser.decodeJWT() reaches SHCParser.inflate(), where Inflater.inflate() can return zero while Inflater.finished() remains false and Inflater.needsInput() is true. The loop also lacks an Inflater.needsDictionary() termination check, SHCParser.decompress() contains the same zero-progress pattern, and ResourceChecker.java can reach SHC parsing during file-format detection. A malformed validation request can pin a JVM worker thread indefinitely, and concurrent requests can exhaust all validation workers. This issue is fixed in version 6.9.12.
- Weakness
- CWE-20, CWE-400, CWE-835
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
In the news0 stories
No ingested article mentions this CVE yet.