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.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

MITM based Zip Slip in ca.uhn.hapi.fhir:org.hl7.fhir.core

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.

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

Workarounds

Unknown

References

Impact

MITM can enable Zip-Slip.

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.

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

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. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Unknown

Frequently Asked Questions

  1. 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.
  2. 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.
  3. 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)
  4. Is there a fix for CVE-2023-24057? Yes. CVE-2023-24057 is fixed in 5.6.92. Upgrade to this version or later.
  5. 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
  6. 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.
  7. 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

Other vulnerabilities in ca.uhn.hapi.fhir:org.hl7.fhir.core

Stop the waste.
Protect your environment with Kodem.