CVE-2026-55470

CVE-2026-55470 is a high-severity inefficient regular expression (ReDoS) vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 (maven), affecting versions <= 6.9.9. It is fixed in 6.9.10.

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: Incomplete fix for CVE-2026-45367: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS

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.

A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use. Typical impact: denial of service when input is crafted to trigger backtracking.

CVE-2026-55470 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.10); upgrading removes the vulnerable code path.

Affected versions

ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 (<= 6.9.9) ca.uhn.hapi.fhir:org.hl7.fhir.convertors (<= 6.9.9) ca.uhn.hapi.fhir:org.hl7.fhir.validation (<= 6.9.9) ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (<= 6.9.9)

Security releases

ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 → 6.9.10 (maven) ca.uhn.hapi.fhir:org.hl7.fhir.convertors → 6.9.10 (maven) ca.uhn.hapi.fhir:org.hl7.fhir.validation → 6.9.10 (maven) ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli → 6.9.10 (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.dstu2 to 6.9.10 or later; ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 6.9.10 or later; ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.10 or later; ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli to 6.9.10 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-55470? CVE-2026-55470 is a high-severity inefficient regular expression (ReDoS) vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 (maven), affecting versions <= 6.9.9. It is fixed in 6.9.10. A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use.
  2. How severe is CVE-2026-55470? CVE-2026-55470 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-55470?
    • ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 (maven) (versions <= 6.9.9)
    • ca.uhn.hapi.fhir:org.hl7.fhir.convertors (maven) (versions <= 6.9.9)
    • ca.uhn.hapi.fhir:org.hl7.fhir.validation (maven) (versions <= 6.9.9)
    • ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli (maven) (versions <= 6.9.9)
  4. Is there a fix for CVE-2026-55470? Yes. CVE-2026-55470 is fixed in 6.9.10. Upgrade to this version or later.
  5. Is CVE-2026-55470 exploitable, and should I be worried? Whether CVE-2026-55470 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-55470 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-55470?
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 to 6.9.10 or later
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 6.9.10 or later
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation to 6.9.10 or later
    • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli to 6.9.10 or later

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

Stop the waste.
Protect your environment with Kodem.