CVE-2026-45367

HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint

Published Jul 16, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.7, the FHIRPathEngine implementation passes user-controlled regular expressions from matches(), matchesFull(), and replaceMatches() to Java regex operations without effective timeouts, allowing catastrophic backtracking and denial of service. This issue is fixed in version 6.9.7.

Analysis

AI-generated

Technical impact

The HAPI FHIR implementation contains a regular expression denial of service vulnerability in its FHIRPathEngine, corresponding to CWE‑1333: Regular Expression Denial of Service. User-controlled regular expressions passed to matches(), matchesFull(), or replaceMatches() are executed by the Java regex engine without timeouts, enabling catastrophic backtracking. An attacker can send a malicious pattern that consumes excessive CPU and memory, causing the FHIR Validator HTTP endpoint to become unresponsive and ultimately leading to a denial of service.

Affected Systems

The affected product is HAPI FHIR’s org.hl7.fhir.core library. Any deployment running a version earlier than 6.9.7 that exposes the FHIRPath evaluation functions over the HTTP validator endpoint is vulnerable. A typical environment would be a healthcare application integrating FHIR resources on a Java servlet container such as Tomcat or Jetty.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity. The EPSS score is less than 1%, indicating a low but nonzero probability of exploitation. KEV is not listed in CISA KEV. The lack of timeout checks and the public exposure of the endpoint suggest a realistic remote exploitation possibility. The most direct attack vector is a remote HTTP request to the validator service that includes a crafted regular expression, which will trigger resource exhaustion before returning a response.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the HAPI FHIR org.hl7.fhir.core library to version 6.9.7 or later, which incorporates input validation for regex operations.
  • If an upgrade cannot be performed immediately, restrict network access to the FHIR Validator HTTP endpoint so that only trusted clients can reach it, or apply rate-limiting to mitigate repeated requests.
  • As a temporary measure, replace or wrap Java’s regex engine with a library that enforces execution timeouts, or configure the JVM to use the timeout feature for Pattern/Matcher when processing FHIRPath expressions.

Generated by OpenCVE AI on July 31, 2026 at 01:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-3653-68v6-rq57 HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint
History
Type Values Removed Values Added
First Time appeared Hapifhir
Hapifhir hl7 Fhir Core
Vendors & Products Hapifhir
Hapifhir hl7 Fhir Core
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.7, the FHIRPathEngine implementation passes user-controlled regular expressions from matches(), matchesFull(), and replaceMatches() to Java regex operations without effective timeouts, allowing catastrophic backtracking and denial of service. This issue is fixed in version 6.9.7.
Title HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint
Weaknesses CWE-1333
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 18, 2026, 3:00 AM
Reserved
May 12, 2026, 12:51 AM
Status
Awaiting Analysis
Published
Jul 16, 2026, 5:16 PM
Modified
Oct 24, 2026, 8:10 PM