CVE-2026-49485
Java vulnerability analysis and mitigation

Overview

CVE-2026-49485 is a Regular Expression Denial of Service (ReDoS) vulnerability in HAPI FHIR's org.hl7.fhir.core library, affecting all implementations of FHIRPathEngine prior to versions 6.9.9 and 6.9.4.2. The vulnerability allows unauthenticated remote attackers to cause denial of service by submitting FHIR resources containing malicious regex patterns that trigger catastrophic backtracking in Java's regex engine. Affected Maven packages include ca.uhn.hapi.fhir:org.hl7.fhir.dstu2, dstu2016may, dstu3, r4, r4b, r5, validation, and validation.cli (all versions ≤ 6.9.8). The advisory was published on June 1, 2026 (GitHub) and July 9, 2026 (NVD). The CVSS v3.1 base score is 7.5 (High) (GitHub Advisory, Feedly).

Technical details

The root cause is Uncontrolled Resource Consumption (CWE-400) and Inefficient Regular Expression Complexity (CWE-1333). The FHIRPath functions matches(), matchesFull(), and replaceMatches() pass user-controlled regular expressions directly to Java's Pattern.compile() and String.replaceAll() via a timeout utility class (RegexTimeout). The timeout utility correctly cancelled the executor thread but could not interrupt the running regex evaluation within that thread, allowing it to persist indefinitely. Additionally, three modules contained FHIRPathEngine method calls that were entirely unprotected by the timeout utility. A crafted pattern such as (a+)+$ evaluated against input like "aaaaaaaaaaaaaaaaaaaaaa!" causes O(2^n) exponential backtracking, saturating a CPU core (GitHub Advisory, Fix Commit).

Impact

Successful exploitation exhausts CPU resources on the affected server, causing denial of service for the FHIR Validator HTTP endpoint and any application using the affected org.hl7.fhir.* modules. Because the vulnerability is network-exploitable with no authentication or user interaction required, a single attacker can repeatedly submit malicious FHIR resources to render the validator unavailable. There is no confidentiality or integrity impact; the sole consequence is availability loss, which is particularly significant in healthcare environments where FHIR validators underpin clinical data interoperability workflows (GitHub Advisory).

Exploitation steps

  1. Reconnaissance: Identify internet-facing FHIR Validator HTTP endpoints or services using HAPI FHIR org.hl7.fhir.core versions ≤ 6.9.8 (e.g., via Shodan searches for FHIR validator services or known healthcare API endpoints).
  2. Craft malicious FHIR resource: Construct a valid FHIR resource (e.g., a Patient or Observation resource) that includes a FHIRPath expression invoking matches(), matchesFull(), or replaceMatches() with a catastrophic backtracking regex pattern such as (a+)+$.
  3. Prepare malicious input string: Pair the evil regex with a long input string (e.g., "aaaaaaaaaaaaaaaaaaaaaa!") that does not match the pattern, forcing the Java regex engine into exponential backtracking.
  4. Submit to validator endpoint: Send the crafted FHIR resource via HTTP POST to the FHIR Validator HTTP endpoint. No authentication credentials are required.
  5. Achieve denial of service: The regex evaluation consumes 100% of a CPU core indefinitely (or until the process is killed/restarted), making the validator unavailable to legitimate users. Repeated requests can sustain the DoS condition (GitHub Advisory).

Indicators of compromise

  • Network: Repeated HTTP POST requests to the FHIR Validator HTTP endpoint containing FHIRPath expressions with matches(), matchesFull(), or replaceMatches() functions and unusual regex patterns (e.g., nested quantifiers like (a+)+).
  • Logs: Application logs showing FHIRException: Timeout evaluating regex: entries (present only in patched versions that caught the timeout); absence of such entries in unpatched versions despite high CPU usage.
  • Process: Sustained 100% CPU utilization on the Java process hosting the FHIR validator, with thread dumps showing threads stuck in java.util.regex.Pattern or String.replaceAll() execution.
  • Availability: Sudden unresponsiveness or extreme latency of the FHIR Validator HTTP endpoint coinciding with inbound requests containing FHIRPath expressions.

Mitigation and workarounds

Upgrade to org.hl7.fhir.core version 6.9.9 (main branch) or 6.9.4.2 (maintenance branch) for all affected Maven packages (ca.uhn.hapi.fhir:org.hl7.fhir.dstu2, dstu2016may, dstu3, r4, r4b, r5, validation, validation.cli). The fix wraps funcReplaceMatches() calls in RegexTimeout.replaceAll() across the r4, r4b, and r5 modules, and extends timeout protection to previously unprotected FHIRPathEngine call sites. No configuration-based workaround is documented; upgrading to a patched version is the only recommended remediation. Organizations unable to upgrade immediately should consider placing the FHIR Validator HTTP endpoint behind an API gateway or WAF that can rate-limit or block requests with suspicious FHIRPath payloads (GitHub Advisory, Release 6.9.4.2).

Community reactions

The advisory was published by HAPI FHIR maintainer dotasek on GitHub on June 1, 2026, with the fix merged via pull request #2463 on May 29, 2026. A Mastodon post from @thehackerwire noted the vulnerability shortly after NVD publication. No significant broader media coverage or notable independent researcher commentary has been identified beyond standard vulnerability aggregator coverage (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Java vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-10050HIGH8.7
  • Java logoJava
  • kafka-4.0
NoYesJul 22, 2026
GHSA-v74w-7mr3-4qg3HIGH7.5
  • Java logoJava
  • io.netty:netty-codec-xml
NoYesJul 24, 2026
CVE-2026-59949MEDIUM6.5
  • Java logoJava
  • at.yawk.lz4:lz4-java
NoYesJul 24, 2026
GHSA-mfg7-5gfp-c4w3MEDIUM5.3
  • Java logoJava
  • io.netty:netty-codec-dns
NoYesJul 24, 2026
GHSA-464c-974j-9xm6LOW3.3
  • JavaScript logoJavaScript
  • github.com/aws/aws-cdk-go/awscdk/v2
NoYesJul 24, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management