/

CVE-2026-81875

Severity:

HIGH RISK

(7.5)

Resource Exhaustion (CWE-400) in HAPI FHIR SHCParser

CVE-2026-81875

Awaiting Analysis

Vulnerability type

Category:

Resource Exhaustion

CWE:

CWE-20, CWE-400, CWE-409

Impact:

Denial of Service

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

HAPI FHIR's SHCParser may allocate excessive memory when processing an attacker-controlled Smart Health Card JWT containing a compressed payload that expands dramatically. An application or validator that accepts such content could experience severe garbage-collection pressure, failed requests, process instability, or termination.

Affected context

The issue can arise in HAPI FHIR deployments that accept and validate attacker-supplied Smart Health Card content before version 6.9.12. It is relevant when the SHCParser handles JWT headers requesting raw DEFLATE decompression and processes the expanded content without an effective output-size boundary.

Exploit preconditions

  • Attack surface: An application, API, or validator service that accepts Smart Health Card content - Required access: Ability to submit attacker-controlled SHC JWT content - Trigger point: JWT payload decompression in SHCParser before JSON parsing completes - Why exploitation is possible: Compressed input can expand to a very large value while decompressed bytes are accumulated without an output-size limit

Why this happens

The parser uses an unbounded decompression pattern in which output bytes are accumulated in memory before the resulting content is parsed as JSON. A small raw-DEFLATE payload can therefore expand into a disproportionately large in-memory value. This maps primarily to CWE-400, Resource Exhaustion, and is also associated with CWE-409, Improper Handling of Highly Compressed Data, because compression expansion is not bounded.

Potential impact

  • An attacker may exhaust application heap memory.
  • Requests could fail or experience substantial latency.
  • The service could suffer severe garbage-collection pressure.
  • The application process could become unstable or terminate.
  • Availability of dependent healthcare interoperability services could be reduced.

General mitigation guidance

Mitigation generally focuses on bounding resource consumption throughout the decompression and parsing pipeline. Secure-by-default designs can enforce maximum compressed and decompressed sizes, reject payloads that exceed application-specific limits, and use streaming or quota-aware processing rather than unbounded in-memory accumulation. Input trust should be reduced through strict structural and schema validation before expensive processing, with timeouts, request-size limits, concurrency controls, and isolation applied where appropriate. Services should run with only the privileges and resource capacity required for their function, and defensive behavior should avoid exposing process-wide availability to a single request.

How teams detect issues like this

Detection approaches can include static analysis for decompression loops that write indefinitely to memory buffers, review of parser code for missing output and input limits, and tests using highly compressible content with controlled expansion ratios. Code review should examine every decompression path, including helper methods and alternate parsing entry points. Runtime monitoring can alert on abnormal heap growth, garbage-collection activity, request sizes, decompression ratios, latency, and process restarts. Policy enforcement may require explicit resource limits for parsers handling untrusted compressed data, while automated review tools can help identify unbounded decompression patterns.

Sources

SourceLink
github.comgithub.com/hapifhir/org.hl7.fhir.core/commit/fbb94216e0ad21ded75be77e5e20242ba194e83f
github.comgithub.com/hapifhir/org.hl7.fhir.core/pull/2493
github.comgithub.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.11
github.comgithub.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.12
github.comgithub.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-3w98-rrpr-fprr

Frequently asked

questions

It can be remotely exploitable when a network-facing application or validator accepts attacker-controlled Smart Health Card content and passes it to the affected parser.

The attacker generally needs only the ability to submit SHC content to an exposed processing interface. No privileged access to the host is inherently required.

Bound both compressed input and decompressed output, reject excessive expansion, and avoid accumulating untrusted decompressed data without enforceable resource limits.

Apply size, time, and concurrency limits to decompression and parsing, validate inputs before expensive processing, monitor resource usage, and include highly compressible test cases in security and regression testing.

Find out what's already
exploitable in your codebase.