Skip to main content

CVE-2023-24057 — MITM based Zip Slip in org.hl7.fhir.r4b — CVE Details

CRITICAL

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

Published January 23, 2023Updated July 8, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.12%). Schedule for your next planned update.

Does your project use an affected ca.uhn.hapi.fhir:org.hl7.fhir.r4b version?

Paste your pom.xml to check it for CVE-2023-24057 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my pom.xml

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.

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

Advisory Timeline

  • First published January 23, 2023 (1403 days ago).
  • Last revised July 8, 2026 — 1261 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.r4b to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.r4b -->
Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.convertors -->
Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.utilities to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.utilities -->
Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.validation to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.validation -->
Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.r5 to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.r5 -->
Maven
Update ca.uhn.hapi.fhir:org.hl7.fhir.core to 5.6.92 or later
<!-- Update pom.xml dependency version to 5.6.92 for ca.uhn.hapi.fhir:org.hl7.fhir.core -->

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: Maven (6).

PackageFixed In
ca.uhn.hapi.fhir:org.hl7.fhir.r4b Maven · Affected: 5.6.22, 5.6.23, 5.6.24, 5.6.25 (+65 more)5.6.92
ca.uhn.hapi.fhir:org.hl7.fhir.convertors Maven · Affected: 0.0.1, 0.0.14, 0.0.2, 0.1.18 (+192 more)5.6.92
ca.uhn.hapi.fhir:org.hl7.fhir.utilities Maven · Affected: 0.0.1, 0.0.14, 0.0.2, 0.1.18 (+192 more)5.6.92
ca.uhn.hapi.fhir:org.hl7.fhir.validation Maven · Affected: 0.0.1, 0.0.14, 0.0.2, 0.1.18 (+192 more)5.6.92
ca.uhn.hapi.fhir:org.hl7.fhir.r5 Maven · Affected: 0.0.1, 0.0.14, 0.0.2, 0.1.18 (+192 more)5.6.92
ca.uhn.hapi.fhir:org.hl7.fhir.core Maven · Affected: 0.0.1, 0.0.14, 0.0.2, 0.1.14 (+192 more)5.6.92

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2023-24057?
MITM based Zip Slip in `ca.uhn.hapi.fhir:org.hl7.fhir.core`. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2023-24057?
CVE-2023-24057 affects ca.uhn.hapi.fhir:org.hl7.fhir.r4b, ca.uhn.hapi.fhir:org.hl7.fhir.convertors and ca.uhn.hapi.fhir:org.hl7.fhir.utilities (and 3 more). It has a 1.1% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-24057 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
1.12%
EPSS percentile: 65.8

This is an above-median EPSS score — 65.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-jqh6-9574-5x22
GHSA-xr8x-pxm6-prjg

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my pom.xml