{"id":"CVE-2023-24057","aliases":["CVE-2023-24057","GHSA-jqh6-9574-5x22","GHSA-xr8x-pxm6-prjg"],"related":[],"kind":"vulnerability","state":"published","title":"MITM based Zip Slip in `ca.uhn.hapi.fhir:org.hl7.fhir.core`","summary":"HL7 (Health Level 7) FHIR Core Libraries before 5.6.92 allow attackers to extract files into arbitrary directories via directory traversal from a crafted ZIP or TGZ archive (for a prepackaged terminology cache, NPM package, or comparison archive).","summarySource":"cvelist","descriptions":[{"lang":"en","text":"HL7 (Health Level 7) FHIR Core Libraries before 5.6.92 allow attackers to extract files into arbitrary directories via directory traversal from a crafted ZIP or TGZ archive (for a prepackaged terminology cache, NPM package, or comparison archive).","source":"cvelist"},{"lang":"en","text":"### Impact\n\nMITM can enable Zip-Slip.\n\n### Vulnerability\n\n#### Vulnerability 1: `Scanner.java`\n\nThere is no validation that the zip file being unpacked has entries that are not maliciously writing outside of the intended destination directory.\nhttps://github.com/hapifhir/org.hl7.fhir.core/blob/8c43e21094af971303131efd081503e5a112db4b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Scanner.java#L335-L357\n\nThis zip archive is downloaded over HTTP instead of HTTPS, leaving it vulnerable to compromise in-flight.\nhttps://github.com/hapifhir/org.hl7.fhir.core/blob/8c43e21094af971303131efd081503e5a112db4b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/Scanner.java#L136\n\n##### Vulnerability 2: `TerminologyCacheManager.java`\n\n**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.\n - https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/TerminologyCacheManager.java\n - https://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/terminologies/TerminologyCacheManager.java\n\nWhile 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.\n\nhttps://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\n\nThis is because the `Utilities.path(String... path)` method does not normalize the path, although it seems to be attempting to do so.\nhttps://github.com/hapifhir/org.hl7.fhir.core/blob/f58b7acfb5e393cac52cc5bbb170bdb669c2880e/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java#L617-L675\n\nThe 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\"`.\n\nThis guard logic can, thus, be easily bypassed:\nhttps://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\n\nAssuming an attacker can control the return value of `ze.getName()`, they can supply a value like `/anything/../../../../zipsip-protection-bypass.txt`.\n\nSimilarly, 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.\n\nhttps://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\n\n\n### Patches\nUnknown\n\n### Workarounds\nUnknown\n\n### References\n\n - https://snyk.io/research/zip-slip-vulnerability","format":"markdown","source":"ghsa"},{"lang":"en","text":"### Impact\nMITM can enable Zip-Slip.\n\n### Vulnerability\n\n#### Vulnerability 1: `Publisher.java`\n\nThere is no validation that the zip file being unpacked has entries that are not maliciously writing outside of the intended destination directory.\n\nhttps://github.com/HL7/fhir-ig-publisher/blob/87313e92de6dd6cea816449e0edd225e054a7891/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/Publisher.java#L3598-L3610\n\n#### Vulnerability 2: `WebSourceProvider.java`\n\nThere is a check for malicious zip entries here, but it is not covered by test cases and could potentially be reverted in future changes.\n\nhttps://github.com/HL7/fhir-ig-publisher/blob/87313e92de6dd6cea816449e0edd225e054a7891/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/web/WebSourceProvider.java#L104-L112\n\n#### Vulnerability 3: `ZipFetcher.java`\n\nThis retains the path for Zip files in FetchedFile entries, which could later be used to output malicious entries to another compressed file or file system.\n\nhttps://github.com/HL7/fhir-ig-publisher/blob/87313e92de6dd6cea816449e0edd225e054a7891/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/ZipFetcher.java#L57-L106\n\n#### Vulnerability 4: `IGPack2NpmConvertor.java`\n\nThe loadZip method retains the path for entries in the zip file, which could later be used to output malicious entries to another compressed file or file system.\n\nhttps://github.com/HL7/fhir-ig-publisher/blob/87313e92de6dd6cea816449e0edd225e054a7891/org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher/IGPack2NpmConvertor.java#L442-L463","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las librerías Core de HL7 (Health Level 7) FHIR anteriores a 5.6.92 permiten a los atacantes extraer archivos en directorios arbitrarios a través de un directory traversal desde un archivo ZIP o TGZ manipulado (para un caché de terminología preempaquetado, un paquete NPM o un archivo de comparación).","source":"nvd"}],"published":"2023-01-23T22:04:47.000Z","modified":"2026-07-08T06:53:02.952Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.6.92"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.core","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.core","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.6.92"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.convertors","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.convertors","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.6.92"}],"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":"5.6.92"}],"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":"5.6.92"}],"ecosystem":"Maven","package":"ca.uhn.hapi.fhir:org.hl7.fhir.utilities","purl":"pkg:maven/ca.uhn.hapi.fhir/org.hl7.fhir.utilities","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.6.92"}],"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":"1.2.30"}],"ecosystem":"Maven","package":"org.hl7.fhir.publisher:org.hl7.fhir.publisher","purl":"pkg:maven/org.hl7.fhir.publisher/org.hl7.fhir.publisher","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"5.6.92"}],"vendor":"hapifhir","product":"hl7_fhir_core","cpe":"cpe:2.3:a:hapifhir:hl7_fhir_core:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"1.2.30"}],"vendor":"hl7","product":"fhir_ig_publisher","cpe":"cpe:2.3:a:hl7:fhir_ig_publisher:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/HL7/fhir-ig-publisher/security/advisories/GHSA-xr8x-pxm6-prjg","tags":["exploit","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/security/advisories/GHSA-jqh6-9574-5x22","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-24057","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core/commit/b50aec59124416b7315a49220cfc3999223414cc","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/hapifhir/org.hl7.fhir.core","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/HL7/fhir-ig-publisher","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-04-01T19:25:38.708Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-24057","url":"https://www.cve.org/CVERecord?id=CVE-2023-24057","licence":"CVE Terms of Use","modified":"2025-04-01T19:26:42.787Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jqh6-9574-5x22","url":"https://github.com/advisories/GHSA-jqh6-9574-5x22","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:50.912Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xr8x-pxm6-prjg","url":"https://github.com/advisories/GHSA-xr8x-pxm6-prjg","licence":"CC-BY-4.0","modified":"2026-07-08T06:53:02.952Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-24057","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-24057","licence":"Public domain","modified":"2026-06-17T05:38:34.507Z"}],"updatedAt":"2026-11-25T22:58:21.733Z","epss":{"score":0.01223,"percentile":0.69598,"date":"2026-12-01T12:00:22.000Z"}}