# CVE-2024-48914: Vendure asset server plugin has local file read vulnerability with AssetServerPlugin & LocalAssetStorageStrategy

> Attackers can traverse the file system to read sensitive files or crash the server via malformed URIs in the Vendure asset server plugin.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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:** 15 Oct 2024
- **Updated:** 15 Oct 2024
- **Also known as:** GHSA-r9mq-3c9r-fmjq

## What is CVE-2024-48914?

CVE-2024-48914 is a critical path traversal vulnerability in vendure-ecommerce vendure, published on 15 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Vendure is an open-source headless commerce platform. Prior to versions 3.0.5 and 2.3.3, a vulnerability in Vendure's asset server plugin allows an attacker to craft a request which is able to traverse the server file system and retrieve the contents of arbitrary files, including sensitive data such as configuration files, environment variables, and other critical data stored on the server. In the same code path is an additional vector for crashing the server via a malformed URI. Patches are available in versions 3.0.5 and 2.3.3. Some workarounds are also available. One may use object storage rather than the local file system, e.g. MinIO or S3, or define middleware which detects and blocks requests with urls containing `/../`.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2024-48914?

4 open source packages ship an affected version, including @vendure/asset-server-plugin.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@vendure/asset-server-plugin` | npm | All versions | 2.3.3 |
| `@vendure/asset-server-plugin` | npm | All versions | 2.3.3 |
| `@vendure/asset-server-plugin` | npm | From 3.0.0 | 3.0.5 |
| `@vendure/asset-server-plugin` | npm | From 3.0.0 | 3.0.5 |

## How do I fix CVE-2024-48914?

Upgrade @vendure/asset-server-plugin to a fixed version for your release line: 2.3.3 or 3.0.5.

## Is CVE-2024-48914 being exploited?

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

Public exploit code:

- Arbitrary File Read and DoS in vendure-ecommerce exploit (github_poc): https://github.com/EQSTLab/CVE-2024-48914
- Vendure - Arbitrary File Read (nuclei): http/cves/2024/CVE-2024-48914.yaml

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-48914 and fix it if it is affected.

What it is: CVE-2024-48914 is a critical path traversal vulnerability in vendure-ecommerce vendure, published on 15 Oct 2024. 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-2024-48914 exists.

Affected packages and fixed versions:
- @vendure/asset-server-plugin (npm): affected all versions; fixed in 2.3.3
- @vendure/asset-server-plugin (npm): affected all versions; fixed in 2.3.3
- @vendure/asset-server-plugin (npm): affected from 3.0.0; fixed in 3.0.5
- @vendure/asset-server-plugin (npm): affected from 3.0.0; fixed in 3.0.5

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-2024-48914/ (Markdown: https://insights.sbomify.com/CVE-2024-48914/index.md)
```

## Sources

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

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