CVE-2026-49485

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

Published Jul 17, 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.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.

Analysis

AI-generated

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

Remediation

No solution or workaround provided in the CVE record.

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
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.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'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 1:45 PM
Reserved
May 30, 2026, 4:17 AM
Status
Awaiting Analysis
Published
Jul 17, 2026, 10:17 PM
Modified
Oct 24, 2026, 8:10 PM