Skip to main content

HAPI FHIR CVE-2026-55470

HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-06-17 https://github.com/hapifhir/org.hl7.fhir.core GHSA-fxj4-p9xp-37v5
7.5
CVSS 3.1 · Vendor: https://github.com/hapifhir/org.hl7.fhir.core
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify exposed FHIR endpoint using DSTU2
  2. Delivery
    Craft FHIR resource with malicious matches() regex
  3. Exploit
    Submit to validator or FHIRPath sink
  4. Execution
    Trigger catastrophic regex backtracking
  5. Persist
    Exhaust server CPU
  6. Impact
    Repeat 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

maven ca.uhn.hapi.fhir:org.hl7.fhir.convertors fix: 6.9.10
maven ca.uhn.hapi.fhir:org.hl7.fhir.dstu2 fix: 6.9.10
maven ca.uhn.hapi.fhir:org.hl7.fhir.validation fix: 6.9.10
maven ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli fix: 6.9.10

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

Vendor (https://github.com/hapifhir/org.hl7.fhir.core) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Unauthenticated network-reachable FHIR endpoint evaluates attacker-supplied regex causing CPU exhaustion; availability-only impact, no confidentiality or integrity effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/hapifhir/org.hl7.fhir.core).

CVSS VectorVendor: https://github.com/hapifhir/org.hl7.fhir.core

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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:

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

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

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 72% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:maven/ca.uhn.hapi.fhir:org.hl7.fhir.dstu2
pkg:maven/ca.uhn.hapi.fhir:org.hl7.fhir.convertors
pkg:maven/ca.uhn.hapi.fhir:org.hl7.fhir.validation
pkg:maven/ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

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

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy