CVE-2026-55470
HAPI FHIR: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.10, the fix for CVE-2026-45367 incompletely patched the DSTU2 module, leaving FHIRPathEngine.matches() in org.hl7.fhir.dstu2/utils/FHIRPathEngine.java to call raw String.matches(sw) without RegexTimeout protection while replaceMatches() was updated, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU. This issue is fixed in version 6.9.10.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.5
HAPI FHIR: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.10, the fix for CVE-2026-45367 incompletely patched the DSTU2 module, leaving FHIRPathEngine.matches() in org.hl7.fhir.dstu2/utils/FHIRPathEngine.java to call raw String.matches(sw) without RegexTimeout protection while replaceMatches() was updated, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU. This issue is fixed in version 6.9.10.
- Record
CVE-2026-55470- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
EUVDEUVD-2026-42440
7.5
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.10, the fix for CVE-2026-45367 incompletely patched the DSTU2 module, leaving FHIRPathEngine.matches() in org.hl7.fhir.dstu2/utils/FHIRPathEngine.java to call raw String.matches(sw) without RegexTimeout protection while replaceMatches() was updated, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU. This issue is fixed in version 6.9.10.
- Record
EUVD-2026-42440- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-fxj4-p9xp-37v5
7.5
HAPI FHIR: Incomplete fix for CVE-2026-45367: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS
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 check
DSTU3 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 exhausted
The 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.
- Record
GHSA-fxj4-p9xp-37v5- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
NVD
7.5
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.10, the fix for CVE-2026-45367 incompletely patched the DSTU2 module, leaving FHIRPathEngine.matches() in org.hl7.fhir.dstu2/utils/FHIRPathEngine.java to call raw String.matches(sw) without RegexTimeout protection while replaceMatches() was updated, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU. This issue is fixed in version 6.9.10.
- Record
CVE-2026-55470- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSV
7.5
HAPI FHIR: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.10, the fix for CVE-2026-45367 incompletely patched the DSTU2 module, leaving FHIRPathEngine.matches() in org.hl7.fhir.dstu2/utils/FHIRPathEngine.java to call raw String.matches(sw) without RegexTimeout protection while replaceMatches() was updated, allowing an unauthenticated attacker to trigger catastrophic regex backtracking and exhaust server CPU. This issue is fixed in version 6.9.10.
- Record
CVE-2026-55470- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVGHSA-fxj4-p9xp-37v5
7.5
HAPI FHIR: Incomplete fix for CVE-2026-45367: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS
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 check
DSTU3 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 exhausted
The 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.
- Record
GHSA-fxj4-p9xp-37v5- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVROOT-APP-MAVEN-CVE-2026-55470 No score
CVE-2026-55470 in ca.uhn.hapi.fhir:org.hl7.fhir.validation - Patched by Root
Root has patched CVE-2026-55470 in the ca.uhn.hapi.fhir:org.hl7.fhir.validation package for Root:Maven. Multiple fixed versions available.
- Record
ROOT-APP-MAVEN-CVE-2026-55470- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
ca.uhn.hapi.fhir:org.hl7.fhir.dstu2Maven |
through 6.9.9 | 6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.convertorsMaven |
through 6.9.9 | 6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.validationMaven |
through 6.9.9 | 6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.validation.cliMaven |
through 6.9.9 | 6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.dstu2Maven |
before 6.9.10, plus listed versions 0.0.10.0.140.0.20.1.181.0.0 Show 45 moreShow less1.1.674.0.04.0.14.0.24.0.34.1.04.2.05.0.05.0.105.0.115.0.125.0.135.0.145.0.155.0.165.0.175.0.185.0.195.0.205.0.215.0.225.0.75.0.85.0.95.1.05.1.15.1.105.1.115.1.125.1.135.1.145.1.155.1.165.1.175.1.185.1.195.1.25.1.205.1.215.1.225.1.35.1.45.1.55.1.65.1.7 |
6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.convertorsMaven |
before 6.9.10, plus listed versions 0.0.10.0.140.0.20.1.181.0.0 Show 45 moreShow less1.1.674.0.04.0.14.0.24.0.34.1.04.2.05.0.05.0.105.0.115.0.125.0.135.0.145.0.155.0.165.0.175.0.185.0.195.0.205.0.215.0.225.0.75.0.85.0.95.1.05.1.15.1.105.1.115.1.125.1.135.1.145.1.155.1.165.1.175.1.185.1.195.1.25.1.205.1.215.1.225.1.35.1.45.1.55.1.65.1.7 |
6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.validationMaven |
before 6.9.10, plus listed versions 0.0.10.0.140.0.20.1.181.0.0 Show 45 moreShow less1.1.674.0.04.0.14.0.24.0.34.1.04.2.05.0.05.0.105.0.115.0.125.0.135.0.145.0.155.0.165.0.175.0.185.0.195.0.205.0.215.0.225.0.75.0.85.0.95.1.05.1.15.1.105.1.115.1.125.1.135.1.145.1.155.1.165.1.175.1.185.1.195.1.25.1.205.1.215.1.225.1.35.1.45.1.55.1.65.1.7 |
6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.validation.cliMaven |
before 6.9.10, plus listed versions 4.0.04.0.14.0.24.0.34.1.04.2.05.0.0 |
6.9.10 |
ca.uhn.hapi.fhir:org.hl7.fhir.validationRoot:Maven |
before 6.9.0-aikido.9 | 6.9.0-aikido.96.7.9-aikido.86.7.9-aikido.106.7.9-aikido.96.9.0-aikido.106.9.4.1-aikido.36.9.0-aikido.116.4.0-aikido.26.9.4.1-aikido.26.0.1-aikido.26.0.1-aikido.36.0.1-aikido.4 |
ca.uhn.hapi.fhir:org.hl7.fhir.dstu2Root:Maven |
before 6.9.0-aikido.9 | 6.9.0-aikido.96.7.9-aikido.86.7.9-aikido.106.7.9-aikido.96.9.0-aikido.106.9.4.1-aikido.36.5.27-aikido.16.4.0-aikido.26.9.4.1-aikido.26.0.1-aikido.26.9.0-aikido.116.0.1-aikido.36.0.1-aikido.4 |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ca.uhn.hapi.fhir:org.hl7.fhir.convertorsRoot:Maven |
before 6.9.0-aikido.9 | 6.9.0-aikido.96.7.9-aikido.86.7.9-aikido.106.7.9-aikido.96.9.0-aikido.106.9.4.1-aikido.36.4.0-aikido.26.9.4.1-aikido.26.0.1-aikido.26.9.0-aikido.116.0.1-aikido.36.0.1-aikido.4 |
io.root.ca.uhn.hapi.fhir:org.hl7.fhir.dstu2Root:Maven |
before 6.9.0-root.io.9 | 6.9.0-root.io.96.7.9-root.io.86.7.9-root.io.106.7.9-root.io.96.9.0-root.io.106.9.4.1-root.io.36.9.0-root.io.116.5.27-root.io.16.4.0-root.io.26.9.4.1-root.io.26.0.1-root.io.26.0.1-root.io.36.0.1-root.io.4 |
io.root.ca.uhn.hapi.fhir:org.hl7.fhir.validationRoot:Maven |
before 6.9.0-root.io.9 | 6.9.0-root.io.96.7.9-root.io.86.7.9-root.io.106.7.9-root.io.96.9.0-root.io.106.9.4.1-root.io.36.9.0-root.io.116.4.0-root.io.26.9.4.1-root.io.26.0.1-root.io.26.0.1-root.io.36.0.1-root.io.4 |
io.root.ca.uhn.hapi.fhir:org.hl7.fhir.convertorsRoot:Maven |
before 6.9.0-root.io.9 | 6.9.0-root.io.96.7.9-root.io.86.7.9-root.io.106.7.9-root.io.96.9.0-root.io.106.9.4.1-root.io.36.9.0-root.io.116.4.0-root.io.26.9.4.1-root.io.26.0.1-root.io.26.0.1-root.io.36.0.1-root.io.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-55470 is a high vulnerability (CVSS 7.5) in Hapifhir Hl7 Fhir Core, published June 17, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.68%, the 52nd percentile. Fixed in ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 6.9.10.
References
github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-fxj4-p9xp-37v5
github.com/hapifhir/org.hl7.fhir.core/commit/56376f7986222626af061ca7fc27ee1ab030e590
github.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.10
github.com/advisories/GHSA-fxj4-p9xp-37v5
github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55470.json
nvd.nist.gov/vuln/detail/CVE-2026-55470
github.com/hapifhir/org.hl7.fhir.core
Left out here: 1,023 versions. The JSON record has them.