Loading...
Skip to main content

CVE-2023-24057 — MITM based Zip Slip in...

CRITICAL

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

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

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

Advisory Timeline

  • First published January 23, 2023 (1358 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, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: maven (6).

PackageEcosystemAffectedFixed In
ca.uhn.hapi.fhir:org.hl7.fhir.r4b
maven
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
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
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
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
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
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). 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

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

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

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies