Vulnerabilities in pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r5
PACKAGECVE-2026-81876 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting HAPI FHIR libraries in the Maven ecosystem. The issue involves shcparser deflate infinite loop causes denial of service. Remediation is available by upgrading affected packages to version 6.9.12.
pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r5
Vulnerability advisories affecting package pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r5. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-gq9c-wmrm-5hvr | CVE-2026-81876 | HIGH | HAPI FHIR: SHCParser DEFLATE infinite loop causes denial of service |
| GHSA-3w98-rrpr-fprr | CVE-2026-81875 | HIGH | HAPI FHIR: SHCParser unbounded DEFLATE decompression causes denial of service |
| GHSA-7cmj-v6x8-frvv | CVE-2026-49485 | HIGH | org.hl7.fhir.core: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint |
| GHSA-3653-68v6-rq57 | CVE-2026-45367 | HIGH | HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint |
| GHSA-p7m9-v2cm-2h7m | CVE-2026-33180 | CRITICAL | HAPI FHIR HTTP authentication leak in redirects |
| GHSA-jqh6-9574-5x22 | CVE-2023-24057 | CRITICAL | MITM based Zip Slip in `ca.uhn.hapi.fhir:org.hl7.fhir.core` |
| GHSA-gr3c-q7xf-47vh | CVE-2024-52007 | HIGH | XXE vulnerability in XSLT parsing in `org.hl7.fhir.core` |
| GHSA-4cf2-cxp3-rjr7 | CVE-2024-51132 | HIGH | HAPI FHIR XML External Entity (XXE) vulnerability |
| GHSA-6cr6-ph3p-f5rf | CVE-2024-45294 | HIGH | XXE vulnerability in XSLT transforms in `org.hl7.fhir.core` |
| GHSA-9654-pr4f-gh6m | CVE-2023-28465 | HIGH | HL7 FHIR Partial Path Zip Slip due to bypass of CVE-2023-24057 |
CVE-2026-81876 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-81876
To remediate this vulnerability, upgrade all affected HAPI FHIR dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.r5</artifactId>
<version>6.9.12</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.validation</artifactId>
<version>6.9.12</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.validation.cli</artifactId>
<version>6.9.12</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-81876, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir
Analyze the terminal output to locate any version of HAPI FHIR in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.9.12), your application is affected.
Note: The mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In HAPI FHIR, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-81876 Affected HAPI FHIR Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ca.uhn.hapi.fhir:org.hl7.fhir.r5
|
Maven |
< 6.9.12
|
6.9.12
|
|
ca.uhn.hapi.fhir:org.hl7.fhir.validation
|
Maven |
< 6.9.12
|
6.9.12
|
|
ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli
|
Maven |
< 6.9.12
|
6.9.12
|
References
Frequently Asked Questions
What is CVE-2026-81876?
Which HAPI FHIR versions are affected?
What version fixes CVE-2026-81876?
Is org.hl7.fhir.r5 affected?
Is org.hl7.fhir.validation affected?
What is the CVSS score of CVE-2026-81876?
What CWE is associated with CVE-2026-81876?
How can I check Maven dependencies for CVE-2026-81876?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gq9c-wmrm-5hvr",
"modified" : "2026-09-17T20:32:21Z",
"published" : "2026-09-17T20:32:21Z",
"aliases" : [ "CVE-2026-81876" ],
"summary" : "HAPI FHIR: SHCParser DEFLATE infinite loop causes denial of service",
"details" : "### Summary\nA malformed Smart Health Card (SHC) JWT with `zip: \"DEF\"` and an empty or truncated DEFLATE payload causes `SHCParser.inflate()` to loop forever. This allows an attacker who can submit SHC content for validation to pin a JVM worker thread indefinitely, causing denial of service.\n\n### Details\nThe vulnerable code is in `org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/SHCParser.java`.\n\n`decodeJWT()` inflates the JWT payload when the header contains `\"zip\":\"DEF\"`:\n\n```java\n// SHCParser.java:300-302\nif (\"DEF\".equals(res.header.asString(\"zip\"))) {\n payloadJson = inflate(payloadJson);\n}\n```\n\n`inflate()` loops only on `!inflater.finished()` and does not check `inflater.needsInput()`, `inflater.needsDictionary()`, or zero-progress output:\n\n```java\n// SHCParser.java:455-468\nwhile (!inflater.finished()) {\n final int count = inflater.inflate(buffer);\n outputStream.write(buffer, 0, count);\n}\n```\n\nFor empty or truncated raw DEFLATE input, `Inflater.inflate()` returns `0`, `finished()` remains `false`, and `needsInput()` becomes `true`, producing an infinite tight loop. The same unsafe loop pattern also exists in `decompress()` at `SHCParser.java:410-423`.\n\nThe validator reaches this path during SHC validation and during file-format detection for SHC-looking input (`ResourceChecker.java:115-118`).\n\n### PoC\nCompile the project, then run a minimal local harness that calls:\n\n```java\nSHCParser.inflate(new byte[0]);\n```\n\nThis never returns. Local verification:\n\n```bash\ntimeout 3s java -cp ... VerifyDoSFindings shcHang\necho $?\n# 124 = timeout killed the hung process\n```\n\nA JWT PoC uses:\n\n- header: Base64URL(`{\"zip\":\"DEF\"}`)\n- payload: empty or truncated raw DEFLATE bytes\n- signature: arbitrary\n\nSubmit the resulting token as SHC content, for example via a `.shc` file or content beginning with `shc:/` that reaches the validator's SHC detection path.\n\n### Impact\nThis is a denial-of-service vulnerability. A single malformed SHC validation request can consume a worker thread indefinitely. In services that validate uploaded SHC content, a small number of concurrent malformed requests can exhaust all validation workers.\n\n### Credits\n- Thai Son Dinh from VinSOC Labs (R&D)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "ca.uhn.hapi.fhir:org.hl7.fhir.r5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.9.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.9.11"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "ca.uhn.hapi.fhir:org.hl7.fhir.validation"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.9.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.9.11"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.9.12"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 6.9.11"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-gq9c-wmrm-5hvr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-81876"
}, {
"type" : "WEB",
"url" : "https://github.com/hapifhir/org.hl7.fhir.core/pull/2493"
}, {
"type" : "WEB",
"url" : "https://github.com/hapifhir/org.hl7.fhir.core/commit/d804558bd77372b1629e55a5b901cad3f5134cdc"
}, {
"type" : "WEB",
"url" : "https://github.com/hapifhir/org.hl7.fhir.core/commit/edd5d8c139e669e39270785f08be7b63aefef24c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapifhir/org.hl7.fhir.core"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-400", "CWE-835" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-17T20:32:21Z",
"nvd_published_at" : "2026-09-16T19:17:44Z"
}
}