# CVE-2023-24057: MITM based Zip Slip in `ca.uhn.hapi.fhir:org.hl7.fhir.core`

> Attackers can extract files to arbitrary directories via crafted archives, potentially leading to code execution or data modification in applications using HL7 FHIR Core Libraries.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Jan 2023
- **Updated:** 1 Apr 2025
- **Also known as:** GHSA-jqh6-9574-5x22, GHSA-xr8x-pxm6-prjg

## What is CVE-2023-24057?

CVE-2023-24057 is a high-severity path traversal vulnerability in n/a, published on 24 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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).

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2023-24057?

14 open source packages ship an affected version, including ca.uhn.hapi.fhir:org.hl7.fhir.convertors, ca.uhn.hapi.fhir:org.hl7.fhir.core and ca.uhn.hapi.fhir:org.hl7.fhir.r4b. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ca.uhn.hapi.fhir:org.hl7.fhir.convertors` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.convertors` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.core` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.core` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.r4b` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.r4b` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.r5` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.r5` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.utilities` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.utilities` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.validation` | Maven | All versions | 5.6.92 |
| `ca.uhn.hapi.fhir:org.hl7.fhir.validation` | Maven | All versions | 5.6.92 |
| `org.hl7.fhir.publisher:org.hl7.fhir.publisher` | Maven | All versions | 1.2.30 |
| `org.hl7.fhir.publisher:org.hl7.fhir.publisher` | Maven | All versions | 1.2.30 |

Products: Hapifhir Hl7 Fhir Core, Hl7 Fhir Ig Publisher.

## How do I fix CVE-2023-24057?

Upgrade ca.uhn.hapi.fhir:org.hl7.fhir.convertors to 5.6.92 or later.

## Is CVE-2023-24057 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-24057 exists.

## Other vulnerabilities in n/a

- [CVE-2026-34361](https://insights.sbomify.com/CVE-2026-34361/): HAPI FHIR: Unauthenticated SSRF via /loadIG Chains with startsWith() Credential Leak for Authentication Token Theft (critical 9.3)
- [CVE-2026-55471](https://insights.sbomify.com/CVE-2026-55471/): HAPI FHIR: XXE in XsltUtilities.saxonTransform via unhardened Saxon TransformerFactory (high 8.7)
- [CVE-2026-55470](https://insights.sbomify.com/CVE-2026-55470/): HAPI FHIR: DSTU2 FHIRPathEngine.matches() missing RegexTimeout protection allows ReDoS (high 7.5)
- [CVE-2023-28465](https://insights.sbomify.com/CVE-2023-28465/): HL7 FHIR Partial Path Zip Slip due to bypass of CVE-2023-24057 (high 7.5)
- [CVE-2026-34359](https://insights.sbomify.com/CVE-2026-34359/): HAPI FHIR: Authentication Credential Leakage via Improper URL Prefix Matching on HTTP Redirect in HAPI FHIR Core (high 7.4)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-24057 and fix it if it is affected.

What it is: CVE-2023-24057 is a high-severity path traversal vulnerability in n/a, published on 24 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-24057 exists.

Affected packages and fixed versions:
- ca.uhn.hapi.fhir:org.hl7.fhir.convertors (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.convertors (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.core (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.core (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.r4b (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.r4b (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.r5 (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.utilities (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.utilities (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven): affected all versions; fixed in 5.6.92
- ca.uhn.hapi.fhir:org.hl7.fhir.validation (Maven): affected all versions; fixed in 5.6.92

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-24057/ (Markdown: https://insights.sbomify.com/CVE-2023-24057/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-24057
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-24057
- OSV: https://osv.dev/vulnerability/CVE-2023-24057

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-24057/
Summaries are generated and may contain mistakes; the official description above is the record.
