ca.uhn.hapi.fhir:org.hl7.fhir.core

CVE-2023-24057

CVE-2023-24057 is a critical-severity path traversal vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.core (maven), affecting versions < 5.6.92. It is fixed in 5.6.92.

Key facts
CVSS score
9.1
Critical
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
ca.uhn.hapi.fhir:org.hl7.fhir.core
Fixed in
5.6.92
Disclosed
2023

Summary

Impact MITM can enable Zip-Slip. Vulnerability Vulnerability 1: Scanner.java There is no validation that the zip file being unpacked has entries that are not maliciously writing outside of the intended destination directory. https://github.com/hapifhir/org.hl7.fhir.core/blob/8c43e21094af971303131efd081503e5a112db4b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Scanner.java#L335-L357 This zip archive is downloaded over HTTP instead of HTTPS, leaving it vulnerable to compromise in-flight. https://github.com/hapifhir/org.hl7.fhir.core/blob/8c43e21094af971303131efd081503e5a112db4b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Scanner.java#L136 Vulnerability 2: TerminologyCacheManager.java Note: While these links point to only one implementation, both implementations of TerminologyCacheManager.java are vulnerable to this as their code seems to be duplicated. https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/TerminologyCacheManager.java https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/terminologies/TerminologyCacheManager.java While there is validation in this bit of logic that attempts to validate that the zip file doesn't contain malicious entries that escape the destination directory, the guard is insufficient. https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/TerminologyCacheManager.java#L97-L113 This is because the Utilities.path(String... path) method does not normalize the path, although it seems to be attempting to do so. https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java#L617-L675 The normalization only occurs if the path element starts with a path traversal payload. As an example, calling Utilities.path("/base", "/child/../test") will return the string "/base/child/../test". This guard logic can, thus, be easily bypassed: https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/TerminologyCacheManager.java#L100-L104 Assuming an attacker can control the return value of ze.getName(), they can supply a value like /anything/../../../../zipsip-protection-bypass.txt. Similarly, an attacker can control the contents of the Zip file via a MITM attack as this logic is used with resources not downloaded over HTTPS. https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/TerminologyCacheManager.java#L66-L73 Patches Unknown Workarounds Unknown References https://snyk.io/research/zip-slip-vulnerability

Impact

What is path traversal?

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Severity and exposure

CVE-2023-24057 has a CVSS score of 9.1 (Critical). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (5.6.92). Upgrading removes the vulnerable code path.

Affected versions

maven

  • ca.uhn.hapi.fhir:org.hl7.fhir.core (< 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.convertors (< 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r4b (< 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r5 (< 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.utilities (< 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation (< 5.6.92)

Security releases

  • ca.uhn.hapi.fhir:org.hl7.fhir.core → 5.6.92 (maven)
  • ca.uhn.hapi.fhir:org.hl7.fhir.convertors → 5.6.92 (maven)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r4b → 5.6.92 (maven)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r5 → 5.6.92 (maven)
  • ca.uhn.hapi.fhir:org.hl7.fhir.utilities → 5.6.92 (maven)
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation → 5.6.92 (maven)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2023-24057 is reachable in your applications. Explore open-source security for your team.

See if CVE-2023-24057 is reachable in your applications. Get a demo

Remediation advice

Upgrade the following packages to resolve this vulnerability:

  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.core to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r4b to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.utilities to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation to 5.6.92 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2023-24057

What is CVE-2023-24057?

CVE-2023-24057 is a critical-severity path traversal vulnerability in ca.uhn.hapi.fhir:org.hl7.fhir.core (maven), affecting versions < 5.6.92. It is fixed in 5.6.92. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.

How severe is CVE-2023-24057?

CVE-2023-24057 has a CVSS score of 9.1 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which packages are affected by CVE-2023-24057?
  • ca.uhn.hapi.fhir:org.hl7.fhir.core (maven) (versions < 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.convertors (maven) (versions < 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r4b (maven) (versions < 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.r5 (maven) (versions < 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.utilities (maven) (versions < 5.6.92)
  • ca.uhn.hapi.fhir:org.hl7.fhir.validation (maven) (versions < 5.6.92)
Is there a fix for CVE-2023-24057?

Yes. CVE-2023-24057 is fixed in 5.6.92. Upgrade to this version or later.

Is CVE-2023-24057 exploitable, and should I be worried?

Whether CVE-2023-24057 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2023-24057 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2023-24057?
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.core to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r4b to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.utilities to 5.6.92 or later
  • Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.validation to 5.6.92 or later

Stop the waste.
Protect your environment with Kodem.