Description
HAPI FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Java. Prior to 6.9.9 and 6.9.4.2, all implementations of FHIRPathEngine accept arbitrary FHIRPath expressions and evaluate them without input validation, and the FHIRPath functions matches(), matchesFull(), and replaceMatches() pass user-controlled regular expressions to Java's Pattern.compile() and String.replaceAll() through an incomplete timeout utility. An attacker can send a resource containing an evil regex pattern that causes catastrophic backtracking, exhausting CPU resources and causing denial of service in the FHIR Validator HTTP endpoint and affected org.hl7.fhir.* modules. This issue is fixed in versions 6.9.9 and 6.9.4.2.
Published: 2026-07-17
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises when an attacker submits a FHIR resource containing an arbitrary FHIRPath expression that uses the matches(), matchesFull(), or replaceMatches() functions. The implementation forwards user‑controlled regular expressions directly to Java's Pattern.compile() and String.replaceAll() without a robust timeout, leading to catastrophic backtracking. This excessive CPU consumption can exhaust server resources and cause the FHIR Validator HTTP endpoint and any org.hl7.fhir.* modules that evaluate FHIRPath expressions to become unresponsive, resulting in a denial of service.

Affected Systems

The affected vendor is HAPI FHIR, specifically the org.hl7.fhir.core library. All releases prior to 6.9.9 and 6.9.4.2 are vulnerable. Deployments that expose the FHIR Validator HTTP endpoint, or any application that processes client FHIR documents using the FHIRPathEngine of org.hl7.fhir.core, are impacted. Versions 6.9.9 and 6.9.4.2 contain a timeout fix that prevents the issue.

Risk and Exploitability

The CVSS score of 7.5 indicates high severity, and the EPSS score of less than 1% shows low but non‑zero likelihood of exploitation. The vulnerability is not listed in CISA's KEV catalog. Based on the description, it is inferred that an attacker can send a crafted payload to a publicly reachable validator endpoint, which would trigger catastrophic backtracking and exhaust CPU resources. Successful exploitation leads to service unavailability without leaking data, but the impact on availability is significant for healthcare interoperability services.

Generated by OpenCVE AI on July 30, 2026 at 23:23 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade HAPI FHIR to at least version 6.9.9 or 6.9.4.2 to apply the fixed timeout logic.
  • If upgrade is not immediately possible, place the validator endpoint behind a firewall or API gateway and enforce a strict timeout on regex evaluation, or limit the size of incoming FHIR documents.
  • Implement monitoring for CPU usage spikes on the validator service and configure alerts to trigger a restart or graceful shutdown when thresholds are exceeded.

Generated by OpenCVE AI on July 30, 2026 at 23:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-7cmj-v6x8-frvv org.hl7.fhir.core: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint
History

Tue, 28 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Hapifhir
Hapifhir hl7 Fhir Core
Vendors & Products Hapifhir
Hapifhir hl7 Fhir Core

Mon, 20 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 17 Jul 2026 21:30:00 +0000

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.9 and 6.9.4.2, all implementations of FHIRPathEngine accept arbitrary FHIRPath expressions and evaluate them without input validation, and the FHIRPath functions matches(), matchesFull(), and replaceMatches() pass user-controlled regular expressions to Java's Pattern.compile() and String.replaceAll() through an incomplete timeout utility. An attacker can send a resource containing an evil regex pattern that causes catastrophic backtracking, exhausting CPU resources and causing denial of service in the FHIR Validator HTTP endpoint and affected org.hl7.fhir.* modules. This issue is fixed in versions 6.9.9 and 6.9.4.2.
Title HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint
Weaknesses CWE-1333
CWE-400
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'}


Subscriptions

Hapifhir Hl7 Fhir Core
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T13:45:26.634Z

Reserved: 2026-05-30T04:17:43.095Z

Link: CVE-2026-49485

cve-icon Vulnrichment

Updated: 2026-07-20T13:45:23.080Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:30:08Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption