ZeroHour

CVE-2026-81875

moderate

Decompression bomb DoS in HAPI FHIR Smart Health Card (SHC) parser

CVSS 3.1
7.5 high
EPSS
Published
()
Modified
AI analysis

HAPI FHIR's SHCParser, which handles SMART Health Card JWTs, fails to limit the size of DEFLATE-decompressed output before parsing it as JSON. An attacker can submit a health-card JWT whose header declares zip: "DEF" and whose tiny compressed payload inflates to a very large value, causing the parser to buffer the entire expanded result in memory. This triggers excessive heap allocation and heavy garbage-collection pressure, leading to failed requests, service instability, or full process termination — a denial of service only, with no confidentiality or integrity impact (CVSS 7.5, availability high). Any application or validator service that accepts attacker-supplied Smart Health Card content is affected, including deployments using the org.hl7.fhir.r5 SHC parsing path. No public proof-of-concept or in-the-wild exploitation is known, and the flaw is fixed in version 6.9.12.

What to do: Upgrade HAPI FHIR to version 6.9.12 or later. As interim mitigation, audit whether your services (FHIR servers, validator endpoints, patient-facing apps) accept attacker-supplied Smart Health Card JWTs; if so, cap JWT payload size, limit decompressed output size or reject zip: "DEF" tokens if not required, and apply rate limits on affected endpoints.

Affected
HAPI FHIR (SHCParser, org.hl7.fhir.r5 element model)All versions prior to 6.9.12
Estimated exposure
moderatelikely thousands of deployments worldwide (HAPI FHIR is the dominant open-source FHIR stack), of which a smaller subset — validator endpoints and APIs… — Estimate based on HAPI FHIR's position as the most widely deployed open-source FHIR server/validator in healthcare (thousands of health systems and national infrastructure use it), tempered by the fact that only services exposing SHC/SMART…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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 consume attacker-controlled Smart Health Card JWT content whose header contains zip: "DEF" and whose small raw-DEFLATE payload expands to a very large value. SHCParser.decodeJWT() passes the decoded payload to SHCParser.inflate(), which accumulates all decompressed bytes in a ByteArrayOutputStream without an output-size limit before JSON parsing, and SHCParser.decompress() contains the same unbounded pattern. An application or validator service that accepts attacker-supplied SHC content can therefore suffer excessive heap allocation, severe garbage-collection pressure, request failure, process instability, or process termination. This issue is fixed in version 6.9.12.

Weakness
CWE-20, CWE-400, CWE-409
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

In the news

No ingested article mentions this CVE yet.