HAPI FHIR CVE-2026-55470
HIGHSeverity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Unauthenticated network-reachable FHIR endpoint evaluates attacker-supplied regex causing CPU exhaustion; availability-only impact, no confidentiality or integrity effect.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Lifecycle Timeline
3DescriptionGitHub Advisory
Summary
The fix for CVE-2026-45367 added RegexTimeout protection to the matches() function in DSTU2016MAY, DSTU3, R4, R4B, and R5, but the DSTU2 module was incompletely patched. In org.hl7.fhir.dstu2, replaceMatches() was updated while matches() at line 2462 still calls the raw String.matches(sw) without any timeout, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU.
Details
Incomplete patch
Within the same file (org.hl7.fhir.dstu2/utils/FHIRPathEngine.java), the two functions were patched inconsistently:
Line 2226 - replaceMatches() - PATCHED:
result.add(new StringType(
RegexTimeout.replaceAll(
convertToString(focus.get(0)), regex, repl, regexTimeoutMillis)));Line 2462 - matches() - NOT PATCHED:
result.add(new BooleanType(
convertToString(focus.get(0)).matches(sw)));
// ↑ raw String.matches() - no RegexTimeout, no complexity checkDSTU3 line 2447 - matches() - PATCHED (for comparison):
result.add(new BooleanType(
RegexTimeout.matches(st, sw, regexTimeoutMillis)));Module-by-module status
| Module | matches() | replaceMatches() |
|---|---|---|
| DSTU2 | ❌ raw str.matches(sw) | ✅ RegexTimeout.replaceAll() |
| DSTU2016MAY | ✅ RegexTimeout.matches() | ✅ |
| DSTU3 | ✅ RegexTimeout.matches() | ✅ |
| R4 | ✅ RegexTimeout.matches() | ✅ |
| R4B | ✅ RegexTimeout.matches() | ✅ |
| R5 | ✅ RegexTimeout.matches() | ✅ |
PoC
Requirements: Java 17+, Maven 3.8+
pom.xml dependencies:
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.utilities</artifactId>
<version>6.9.7</version>
</dependency>Test code (reproduces the exact behaviour of DSTU2 line 2462):
import org.hl7.fhir.utilities.regex.RegexTimeout;
import java.util.concurrent.*;
String regex = "((a|b){0,5}){20}";
String input = "a".repeat(25) + "c"; // no match → full backtracking
// ① Patched approach - RegexTimeout terminates at 500 ms
long t1 = System.currentTimeMillis();
try {
RegexTimeout.matches(input, regex, 500);
} catch (TimeoutException e) {
System.out.println("RegexTimeout blocked in " +
(System.currentTimeMillis() - t1) + " ms");
}
// ② DSTU2 line 2462 - raw String.matches(), no timeout
long t2 = System.currentTimeMillis();
input.matches(regex); // equivalent to what FHIRPathEngine does
System.out.println("str.matches() ran for " +
(System.currentTimeMillis() - t2) + " ms with no timeout");Verified output (JDK 25.0.3, Linux):
RegexTimeout blocked in 508 ms ← patched modules: attack stopped
str.matches() ran for 1410 ms ← DSTU2: no timeout, CPU exhaustedThe patched approach cuts off the evaluation at 508 ms. The unpatched DSTU2 code runs for 1410 ms on this input with no mechanism to stop it. Longer inputs or more complex patterns produce proportionally worse results.
Impact
Vulnerability type: Regular Expression Denial of Service (ReDoS) causing CPU exhaustion and service disruption.
Who is impacted: Any application using the ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 module that evaluates user-supplied FHIRPath expressions - including the FHIR Validator HTTP endpoint, FHIR servers applying FHIRPath invariants from user-provided resources or profiles, and any system embedding FHIRPathEngine from the DSTU2 module. No authentication is required; an attacker needs only to submit a FHIR resource or FHIRPath expression whose matches() argument contains a catastrophically backtracking regular expression.
Articles & Coverage 1
AnalysisAI
Regular expression denial of service in HAPI FHIR's DSTU2 FHIRPathEngine allows unauthenticated remote attackers to exhaust server CPU by submitting FHIR resources or FHIRPath expressions containing catastrophically backtracking regexes against the matches() function. This is an incomplete-fix vulnerability stemming from CVE-2026-45367, where the DSTU2 module's matches() at FHIRPathEngine.java line 2462 was left calling raw String.matches() without the RegexTimeout wrapper applied to the other five FHIR version modules. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Target application must embed HAPI FHIR's org.hl7.fhir.dstu2 FHIRPathEngine (transitively via org.hl7.fhir.convertors, .validation, or .validation.cli at version <=6.9.9) AND expose a code path that evaluates attacker-controlled FHIRPath expressions against attacker-controlled input - typically the FHIR Validator HTTP endpoint, a server applying FHIRPath invariants from user-submitted resources/profiles, or any service calling FHIRPathEngine on untrusted input. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | CVSS 3.1 base score is 7.5 with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, consistent with a network-reachable, unauthenticated, no-interaction DoS affecting availability only - confidentiality and integrity are unaffected. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | An unauthenticated attacker submits a FHIR resource, profile, or FHIRPath invariant to a public FHIR Validator endpoint or any HAPI-backed server that runs DSTU2 FHIRPath, embedding an expression such as matches('((a|b){0,5}){20}') applied to a non-matching string. The server enters exponential backtracking on the regex engine, pinning a CPU core for seconds to minutes; the reporter's PoC on the GHSA advisory demonstrates exactly this. … |
| Remediation | Vendor-released patch: 6.9.10 - upgrade all four affected Maven artifacts (org.hl7.fhir.dstu2, org.hl7.fhir.convertors, org.hl7.fhir.validation, org.hl7.fhir.validation.cli) from <=6.9.9 to 6.9.10 or later via your dependency manager and rebuild downstream applications including the FHIR Validator CLI and any embedded HAPI services; advisory at https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-fxj4-p9xp-37v5. … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
24 hours: Inventory all HAPI FHIR deployments and identify DSTU2 instances; immediately restrict network access to FHIRPath query endpoints to internal systems only. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
More from same product – last 7 days
Local denial of service in Android's PackageInstaller subsystem stems from a logic error in PackageInstallerSession.tran
NoSQL/query injection in Spring AI Vector Stores (1.0.0-1.0.8 and 1.1.0-1.1.7) allows remote unauthenticated attackers t
Origin validation failure in Spring Cloud Gateway (WebMVC and WebFlux Server variants) allows remote attackers to spoof
Denial-of-service in Spring Cloud Sleuth 3.1.0 through 3.1.13 allows remote unauthenticated attackers to exhaust applica
Denial of service in Steeltoe.Discovery.Eureka client (.NET) versions prior to 4.2.0 and 3.4.0 allows a remote Eureka re
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-fxj4-p9xp-37v5