CVE-2026-55470: HAPI FHIR Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-fxj4-p9xp-37v5
CVSS 7.5
CWE-1333
Published
Advisory Summary

CVE-2026-55470 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting HAPI FHIR libraries in the Maven ecosystem. The issue involves incomplete fix for cve-2026-45367: dstu2 fhirpathengine.matches() missing regextimeout protection allows redos. Remediation is available by upgrading affected packages to version 6.9.10.

CVE-2026-55470 at a Glance

CVE Identifier CVE-2026-55470
GHSA Identifier GHSA-fxj4-p9xp-37v5
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product HAPI FHIR
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-55470

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.

ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 fixed: 6.9.10
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.dstu2</artifactId>
    <version>6.9.10</version>
</dependency>
ca.uhn.hapi.fhir:org.hl7.fhir.convertors fixed: 6.9.10
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.convertors</artifactId>
    <version>6.9.10</version>
</dependency>
ca.uhn.hapi.fhir:org.hl7.fhir.validation fixed: 6.9.10
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.validation</artifactId>
    <version>6.9.10</version>
</dependency>
ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli fixed: 6.9.10
<dependency>
    <groupId>ca.uhn.hapi.fhir</groupId>
    <artifactId>org.hl7.fhir.validation.cli</artifactId>
    <version>6.9.10</version>
</dependency>
Verify Direct and Transitive Dependencies

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-55470, 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.10), 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. 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

## 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:** ```java result.add(new StringType( RegexTimeout.replaceAll( convertToString(focus.get(0)), regex, repl, regexTimeoutMillis))); ``` **Line 2462 — matches() — NOT PATCHED:** ```java 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):** ```java 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:** ```xml <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):** ```java 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.

CVE-2026-55470 Affected HAPI FHIR Versions

4 component(s)
Fixed Versions:
6.9.10
Product / Package Ecosystem Affected Versions Fixed Version
ca.uhn.hapi.fhir:org.hl7.fhir.dstu2
Maven
< 6.9.10
6.9.10
ca.uhn.hapi.fhir:org.hl7.fhir.convertors
Maven
< 6.9.10
6.9.10
ca.uhn.hapi.fhir:org.hl7.fhir.validation
Maven
< 6.9.10
6.9.10
ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli
Maven
< 6.9.10
6.9.10

References

Frequently Asked Questions

What is CVE-2026-55470?
CVE-2026-55470 is a security vulnerability in HAPI FHIR involving Incomplete fix for CVE-2026-45367: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS under CWE-1333: Inefficient Regular Expression Complexity.
Which HAPI FHIR versions are affected?
Affected versions include releases prior to 6.9.10 across affected packages: ca.uhn.hapi.fhir:org.hl7.fhir.dstu2, ca.uhn.hapi.fhir:org.hl7.fhir.convertors, ca.uhn.hapi.fhir:org.hl7.fhir.validation, ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli.
What version fixes CVE-2026-55470?
Upgrading to 6.9.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is org.hl7.fhir.dstu2 affected?
Yes, ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 is affected in releases prior to 6.9.10. Upgrade your dependency to 6.9.10 or later.
Is org.hl7.fhir.convertors affected?
Yes, ca.uhn.hapi.fhir:org.hl7.fhir.convertors is affected in releases prior to 6.9.10. Upgrade your dependency to 6.9.10 or later.
What is the CVSS score of CVE-2026-55470?
CVE-2026-55470 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-55470?
CVE-2026-55470 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check Maven dependencies for CVE-2026-55470?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ca.uhn.hapi.fhir'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fxj4-p9xp-37v5",
  "modified" : "2026-06-17T18:47:23Z",
  "published" : "2026-06-17T18:47:23Z",
  "aliases" : [ "CVE-2026-55470" ],
  "summary" : "HAPI FHIR: Incomplete fix for CVE-2026-45367: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS",
  "details" : "## Summary\nThe 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.\n\n\n## Details\n### Incomplete patch\n\nWithin the same file\n(`org.hl7.fhir.dstu2/utils/FHIRPathEngine.java`), the two functions were\npatched inconsistently:\n\n**Line 2226 — replaceMatches() — PATCHED:**\n```java\nresult.add(new StringType(\n    RegexTimeout.replaceAll(\n        convertToString(focus.get(0)), regex, repl, regexTimeoutMillis)));\n```\n\n**Line 2462 — matches() — NOT PATCHED:**\n```java\nresult.add(new BooleanType(\n    convertToString(focus.get(0)).matches(sw)));\n// ↑ raw String.matches() — no RegexTimeout, no complexity check\n```\n\n**DSTU3 line 2447 — matches() — PATCHED (for comparison):**\n```java\nresult.add(new BooleanType(\n    RegexTimeout.matches(st, sw, regexTimeoutMillis)));\n```\n\n### Module-by-module status\n\n| Module | `matches()` | `replaceMatches()` |\n|---|---|---|\n| **DSTU2** | ❌ raw `str.matches(sw)` | ✅ `RegexTimeout.replaceAll()` |\n| DSTU2016MAY | ✅ `RegexTimeout.matches()` | ✅ |\n| DSTU3 | ✅ `RegexTimeout.matches()` | ✅ |\n| R4 | ✅ `RegexTimeout.matches()` | ✅ |\n| R4B | ✅ `RegexTimeout.matches()` | ✅ |\n| R5 | ✅ `RegexTimeout.matches()` | ✅ |\n\n\n## PoC\n**Requirements:** Java 17+, Maven 3.8+\n\n**pom.xml dependencies:**\n```xml\n<dependency>\n    <groupId>ca.uhn.hapi.fhir</groupId>\n    <artifactId>org.hl7.fhir.utilities</artifactId>\n    <version>6.9.7</version>\n</dependency>\n```\n\n**Test code (reproduces the exact behaviour of DSTU2 line 2462):**\n```java\nimport org.hl7.fhir.utilities.regex.RegexTimeout;\nimport java.util.concurrent.*;\n\nString regex = \"((a|b){0,5}){20}\";\nString input = \"a\".repeat(25) + \"c\";    // no match → full backtracking\n\n// ① Patched approach — RegexTimeout terminates at 500 ms\nlong t1 = System.currentTimeMillis();\ntry {\n    RegexTimeout.matches(input, regex, 500);\n} catch (TimeoutException e) {\n    System.out.println(\"RegexTimeout blocked in \" +\n        (System.currentTimeMillis() - t1) + \" ms\");\n}\n\n// ② DSTU2 line 2462 — raw String.matches(), no timeout\nlong t2 = System.currentTimeMillis();\ninput.matches(regex);                   // equivalent to what FHIRPathEngine does\nSystem.out.println(\"str.matches() ran for \" +\n    (System.currentTimeMillis() - t2) + \" ms with no timeout\");\n```\n\n**Verified output (JDK 25.0.3, Linux):**\n```\nRegexTimeout blocked in 508 ms      ← patched modules: attack stopped\nstr.matches() ran for 1410 ms       ← DSTU2: no timeout, CPU exhausted\n```\n\nThe patched approach cuts off the evaluation at 508 ms. The unpatched DSTU2\ncode runs for 1410 ms on this input with no mechanism to stop it. Longer\ninputs or more complex patterns produce proportionally worse results.\n\n\n## Impact\n**Vulnerability type:** Regular Expression Denial of Service (ReDoS) causing CPU exhaustion and service disruption.\n\n**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.",
  "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.dstu2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.9.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.9.9"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ca.uhn.hapi.fhir:org.hl7.fhir.convertors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.9.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.9.9"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ca.uhn.hapi.fhir:org.hl7.fhir.validation"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.9.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.9.9"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.9.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 6.9.9"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-fxj4-p9xp-37v5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hapifhir/org.hl7.fhir.core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-17T18:47:23Z",
    "nvd_published_at" : null
  }
}