CVE-2026-81876: HAPI FHIR SHCParser DEFLATE infinite loop denial of service

CVE-2026-81876 · Severity: high · CVSS 7.5 · Published 2026-09-16

HAPI FHIR is a healthcare data library used to validate and process medical records in standards-compliant formats. A malformed Smart Health Card (digital health credential) with a compressed payload can cause the validation process to hang indefinitely, freezing a worker thread. An attacker submitting multiple malformed cards could exhaust all validation workers, making the entire validation service unavailable.

Technologies: ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven), ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven), ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven). Vendors: Maven.

Quick answers

Is CVE-2026-81876 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-81876 being exploited in the wild.
How severe is CVE-2026-81876?
High severity, with a CVSS score of 7.5, published 16 September 2026.
Which products and versions are affected?
ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven) <= 6.9.11, ECOSYSTEM:introduced=0,fixed=6.9.12; ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven) <= 6.9.11, ECOSYSTEM:introduced=0,fixed=6.9.12; ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven) <= 6.9.11, ECOSYSTEM:introduced=0,fixed=6.9.12.
Is there a fix for CVE-2026-81876?
Yes. ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven): upgrade to 6.9.12 or later; ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven): upgrade to 6.9.12 or later; ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven): upgrade to 6.9.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-81876 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-81876?
Check whether you run ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven), ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven) or ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven): upgrade to 6.9.12 or later
    # set ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 6.9.12 in your pom.xml or build.gradle
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven): upgrade to 6.9.12 or later
    # set ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.12 in your pom.xml or build.gradle
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven): upgrade to 6.9.12 or later
    # set ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli to 6.9.12 in your pom.xml or build.gradle

Technical details

The vulnerability is an infinite loop in the SHCParser.inflate() method (lines 455–468 in SHCParser.java) caused by unsafe decompression logic. When a JWT contains zip: "DEF" (DEFLATE compression) but the payload is empty or truncated, the Inflater.inflate() call returns 0 bytes, finished() remains false, and the loop condition never exits. The vulnerable code does not check needsInput() or needsDictionary(), and does not detect zero-progress states. The same unsafe pattern exists in the decompress() method. An unauthenticated attacker can trigger this path by submitting malformed SHC content (.shc files or shc:// URIs) to a validator; the vulnerability is also reachable during file-format detection. A single request hangs indefinitely; multiple concurrent requests exhaust worker threads and cause denial of service.

Affected products

  • HAPI FHIR HAPI FHIR <unknown

Identifiers

  • CVE-2026-81876
  • GHSA-gq9c-wmrm-5hvr

Timeline

  • 2026-09-17: disclosed
  • other: CVE-2026-81876 assigned

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.