HAPI FHIR CVE-2026-55470
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify exposed FHIR endpoint using DSTU2
-
DeliveryCraft FHIR resource with malicious matches() regex
-
ExploitSubmit to validator or FHIRPath sink
-
ExecutionTrigger catastrophic regex backtracking
-
PersistExhaust server CPU
-
ImpactRepeat to deny service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | 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. The specific sink is the matches() FHIRPath function (FHIRPathEngine.java line 2462); replaceMatches() and the equivalent functions in DSTU2016MAY/DSTU3/R4/R4B/R5 are already protected and NOT exploitable. No authentication, no user interaction, and no special configuration beyond using the DSTU2 module is required. Deployments that only use R4/R4B/R5 and do not load the DSTU2 artifact are not exploitable. |
| Impact | 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. The vulnerability is highly automatable: a single crafted FHIR resource or invariant containing an evil regex can pin a CPU core, and repeated submission can take an entire validator or server offline. The reporter has published a verified, reproducible PoC in the GHSA advisory (508 ms timeout vs. 1410 ms unrestricted runtime on a trivial input, scaling exponentially with input length), so publicly available exploit code exists. EPSS and CISA KEV data were not provided in the input, so widespread exploitation cannot be confirmed; given the niche (DSTU2 specifically is the oldest FHIR draft and many modern deployments use R4/R4B/R5) the realistic blast radius is narrower than the CVSS suggests - risk is real but concentrated in legacy or multi-version FHIR stacks that still load the DSTU2 module. |
| Exploit ScenarioDerived | 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. Repeating the request across the worker pool yields full service denial with no credentials and no interaction. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 18, 2026
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. No public exploit identified at time of analysis beyond the reporter's working PoC published in the GHSA advisory.
RemediationAI
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. If upgrading immediately is not possible, compensating controls include disabling DSTU2 support entirely if your deployment only needs R4/R4B/R5 (trade-off: breaks any legacy DSTU2 clients), placing the FHIR Validator HTTP endpoint behind authentication and aggressive per-request CPU/time quotas at the reverse proxy or container level (trade-off: legitimate large-resource validations may be cut off), or rejecting inbound FHIRPath expressions and invariants that contain nested quantifiers or alternation patterns indicative of catastrophic backtracking via a WAF rule (trade-off: false positives on legitimate complex profiles).
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in maven
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HAPI FHIR is the reference Java implementation of HL7 FHIR (Fast Healthcare Interoperability Resources), widely deployed in healthcare backends, validation servers, and clinical data pipelines. The FHIRPathEngine evaluates FHIRPath expressions - a query/navigation language used in FHIR invariants, search parameters, and validation rules - where the matches() function tests strings against caller-supplied regular expressions via Java's java.util.regex engine. Because java.util.regex uses an NFA backtracking matcher, evil regex patterns such as ((a|b){0,5}){20} against non-matching input produce exponential backtracking, the textbook CWE-1333 (Inefficient Regular Expression Complexity) scenario. The upstream maintainers had previously introduced a RegexTimeout helper (CVE-2026-45367) that wraps matching in a cancellable task; this fix was applied to DSTU2016MAY, DSTU3, R4, R4B, and R5 but the legacy DSTU2 module's matches() implementation was missed, even though the adjacent replaceMatches() in the same file was updated.
Know when Java gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity 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 Vendor (https://github.com/hapifhir/org.hl7.fhir.core).
CVSS VectorVendor: https://github.com/hapifhir/org.hl7.fhir.core
DescriptionCVE.org
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
Executive ViewAI
HAPI FHIR-the healthcare data interoperability standard used by medical organizations to exchange patient data-contains a remote denial-of-service vulnerability in its DSTU2 module exploitable without authentication. Publicly available exploit code exists and attackers can crash servers via malicious FHIR data or expressions. This represents a regression from an incomplete prior patch, placing organizations currently using this library at direct risk of service outages.
No vendor-released patch identified at time of analysis. Interim mitigations include: (1) restrict network access to FHIRPath endpoints to internal systems; (2) validate FHIRPath expressions to reject those with complex regular expressions; (3) enforce request timeouts on all FHIR queries; (4) monitor CPU utilization and response times with alerting; (5) implement per-client rate limiting; (6) disable or restrict the matches() function if operationally non-critical.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m
Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti
Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow
Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla
The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during
GHSA-fxj4-p9xp-37v5
NVD
CVE.org
EPSS
VulDB
Exploit-DB