{"id":"CVE-2026-49485","aliases":["CVE-2026-49485","GHSA-7cmj-v6x8-frvv"],"related":[],"kind":"vulnerability","state":"published","title":"HAPI FHIR: ReDoS via FHIRPath matches()/replaceMatches() in FHIR Validator HTTP Endpoint","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"# Summary\nAll implementations of FHIRPathEngine accept arbitrary FHIRPath expressions and evaluate them without input validation. The utility intended to secure this evaluation did so incorrectly, and did not fully cover all places in which evaluation was being done. An attacker can send a resource containing an evil regex pattern that causes catastrophic backtracking, exhausting system resources, and causing Denial-of-Service.\n\n## Details\nThe vulnerability exists in regex execution in FHIRPathEngine implementations across multiple code modules. The FHIRPath functions matches(), matchesFull(), and replaceMatches() pass user-controlled regular expressions to Java's Pattern.compile() and String.replaceAll() through a utility class designed to time out after a specified interval. That utility correctly cancelled a single executor thread and returned with an exception, but the execution within the thread had no means to listen for this cancellation and would persist. Furthermore, three modules contained method calls in FHIRPathEngine that were not protected by this utility class.\n\n## Why this is exploitable:\n\nJava's Pattern.compile() with a pattern like (a+)+$ against input \"aaaaaaaaaaaaaaaaaaaaaa!\" causes exponential backtracking (O(2^n) time complexity). \n\n## Impact\nCPU Exhaustion: The exponential backtracking in Java's regex engine consumes 100% of a CPU core for the duration of the hang (effectively infinite for sufficiently long input strings) for callers of FHIRPathEngine.","format":"markdown","source":"ghsa"},{"lang":"es","text":"HAPI FHIR es una implementación completa del estándar HL7 FHIR para la interoperabilidad sanitaria en Java. Antes de las versiones 6.9.9 y 6.9.4.2, todas las implementaciones de FHIRPathEngine aceptan expresiones FHIRPath arbitrarias y las evalúan sin validación de entrada, y las funciones FHIRPath matches(), matchesFull() y replaceMatches() pasan expresiones regulares controladas por el usuario a Pattern.compile() y String.replaceAll() de Java a través de una utilidad de tiempo de espera incompleta. Un atacante puede enviar un recurso que contenga un patrón de regex malicioso que cause un retroceso catastrófico, agotando los recursos de la CPU y provocando una denegación de servicio en el endpoint HTTP del validador FHIR y en los módulos org.hl7.fhir.* afectados. Este problema está solucionado en las versiones 6.9.9 y 6.9.4.2.","source":"nvd"}],"published":"2026-07-09T13:43:03.000Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"version":"< 6.9.4.2","status":"affected"},{"version":">= 6.9.5, < 6.9.9","status":"affected"}],"vendor":"hapifhir","product":"org.hl7.fhir.core","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu2","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu2016may","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2016may","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu3","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu3","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r4","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r4","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r4b","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r4b","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r5","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r5","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.validation","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.validation","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.9.5","status":"affected","fixed":"6.9.9"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu2","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu2016may","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu2016may","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.dstu3","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.dstu3","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r4","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r4","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r4b","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r4b","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.r5","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.r5","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.validation","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.validation","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.9.4.2"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.validation.cli","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.validation.cli","source":"ghsa"}],"references":[{"url":"https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-7cmj-v6x8-frvv","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/pull/2463","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/commit/109c88837c032ef399b2eb87ddde86692065cf41","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/commit/e08982d2b6f6dcd6c670a762d9cf999179fbe4ed","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.4.2","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/releases/tag/6.9.9","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-07-20T13:45:18.499Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49485","url":"https://www.cve.org/CVERecord?id=CVE-2026-49485","licence":"CVE Terms of Use","modified":"2026-07-20T13:45:26.634Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7cmj-v6x8-frvv","url":"https://github.com/advisories/GHSA-7cmj-v6x8-frvv","licence":"CC-BY-4.0","modified":"2026-07-09T14:11:38.736Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49485","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49485","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:28.591Z","epss":{"score":0.00371,"percentile":0.33093,"date":"2026-12-01T12:00:22.000Z"}}