CVE-2026-81875

CVE-2026-81875 is a high-severity improper input validation vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.r5 (maven), affecting versions <= 6.9.11. It is fixed in 6.9.12.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

HAPI FHIR: SHCParser unbounded DEFLATE decompression causes denial of service

SHCParser inflates compressed Smart Health Card JWT payloads into memory without a decompressed-size limit. An attacker who can submit SHC content for validation can craft a small compressed JWT payload that expands to a very large byte array, causing memory exhaustion or severe garbage collection pressure.

Details

The vulnerable code is in org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/SHCParser.java.

decodeJWT() checks MAX_ALLOWED_SHC_LENGTH, but this only logs an error and parsing continues:

// SHCParser.java:282-284
if (jwt.length() > MAX_ALLOWED_SHC_LENGTH) {
  logError(...);
}

If the header contains "zip":"DEF", the payload is inflated before JSON parsing:

// SHCParser.java:300-304
if ("DEF".equals(res.header.asString("zip"))) {
  payloadJson = inflate(payloadJson);
}
res.payload = JsonParser.parseObject(FileUtilities.bytesToString(payloadJson), true);

inflate() accumulates all decompressed output in a ByteArrayOutputStream and has no maximum output size:

// SHCParser.java:455-468
while (!inflater.finished()) {
  final int count = inflater.inflate(buffer);
  outputStream.write(buffer, 0, count);
}
return outputStream.toByteArray();

The same unbounded decompression pattern exists in decompress() at SHCParser.java:410-423.

PoC

Create a highly compressible SHC-shaped JSON payload, compress it with raw DEFLATE (new Deflater(9, true)), Base64URL-encode it as the JWT payload, and set the JWT header to {"zip":"DEF"}.

Local verification measured the following expansion through SHCParser.inflate():

plain=1000066 compressed=1052 inflated=1000066 ratio=950
plain=16000066 compressed=15626 inflated=16000066 ratio=1023

A small compressed payload can therefore allocate many megabytes of heap. Larger payloads can trigger OutOfMemoryError or process instability.

Credits

  • Thai Son Dinh from VinSOC Labs (R&D)

Impact

This is a denial-of-service vulnerability. Any validator service or application that accepts attacker-supplied SHC content can be forced to allocate excessive heap memory. Impact ranges from request failure and severe GC pressure to process termination.

The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths. Typical impact: varies by context: data corruption, logic bypass, or denial of service.

CVE-2026-81875 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (6.9.12); upgrading removes the vulnerable code path.

Affected versions

ca.uhn.hapi.fhir:org.hl7.fhir.r5 (<= 6.9.11) ca.uhn.hapi.fhir:org.hl7.fhir.validation (<= 6.9.11) ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (<= 5.0.0)

Security releases

ca.uhn.hapi.fhir:org.hl7.fhir.r5 → 6.9.12 (maven) ca.uhn.hapi.fhir:org.hl7.fhir.validation → 6.9.12 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 6.9.12 or later; ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.12 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-81875? CVE-2026-81875 is a high-severity improper input validation vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.r5 (maven), affecting versions <= 6.9.11. It is fixed in 6.9.12. The application does not adequately validate input before processing it, allowing unexpected values to reach sensitive code paths.
  2. How severe is CVE-2026-81875? CVE-2026-81875 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-81875?
    • ca.uhn.hapi.fhir:org.hl7.fhir.r5 (maven) (versions <= 6.9.11)
    • ca.uhn.hapi.fhir:org.hl7.fhir.validation (maven) (versions <= 6.9.11)
    • ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (maven) (versions <= 5.0.0)
  4. Is there a fix for CVE-2026-81875? Yes. CVE-2026-81875 is fixed in 6.9.12. Upgrade to this version or later.
  5. Is CVE-2026-81875 exploitable, and should I be worried? Whether CVE-2026-81875 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-81875 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-81875?
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 6.9.12 or later
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.12 or later

Other vulnerabilities in ca.uhn.hapi.fhir:org.hl7.fhir.r5

Stop the waste.
Protect your environment with Kodem.