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

Source: https://junglewise.ai/threats/cve-2026-81876-hapi-fhir-shcparser-deflate-infinite-loop-denial-of-service  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-16. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/ca-uhn-hapi-fhir-org-hl7-fhir-r5), [ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven)](https://junglewise.ai/threats/technologies/ca-uhn-hapi-fhir-org-hl7-fhir-validation), [ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (Maven)](https://junglewise.ai/threats/technologies/ca-uhn-hapi-fhir-org-hl7-fhir-validation-cli). Vendors: [Maven](https://junglewise.ai/threats/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

  ```sh
  # 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

  ```sh
  # 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

  ```sh
  # 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

## Related threats

- [HAPI FHIR SHCParser unbounded DEFLATE decompression denial of service](https://junglewise.ai/threats/cve-2026-81875-hapi-fhir-shcparser-unbounded-deflate-decompression-denial-of)
- [HAPI FHIR ReDoS in FHIRPathEngine](https://junglewise.ai/threats/cve-2026-49485-hapi-fhir-redos-in-fhirpathengine)
- [HAPI FHIR ReDoS in FHIRPathEngine](https://junglewise.ai/threats/cve-2026-45367-hapi-fhir-redos-in-fhirpathengine)
- [HAPI FHIR ReDoS in DSTU2 FHIRPathEngine](https://junglewise.ai/threats/cve-2026-55470-hapi-fhir-redos-in-dstu2-fhirpathengine)
- [HAPI FHIR SSRF and credential leak in FHIR Validator](https://junglewise.ai/threats/cve-2026-34361-hapi-fhir-ssrf-and-credential-leak-in-fhir-validator)
