Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-r9mq-3c9r-fmjq

CRITICAL

Vendure asset server plugin has local file read vulnerability with AssetServerPlugin & LocalAssetStorageStrategy

Also known asCVE-2024-48914
Published
Oct 15, 2024
Updated
Oct 15, 2024
Affected
2 pkgs
Patched
2 / 2
Exploits
2 known

EPSS Exploitation Probability

via FIRST.org ↗
60.4%probability of exploitation in next 30 days
High Risk99th percentile+0.63%
50.0%66.7%83.3%100.0%91.8%60.4%Jan 26May 26Jul 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

2 pkgs affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@vendure/asset-server-pluginnpm
15Kdownloads / week

Description

Description

Path traversal

This vulnerability 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.

From Rajesh Sharma who discovered the vulnerability:

POC: curl --path-as-is http://localhost:3000/assets/../package.json gives you the content of package.json present in the local directory.

The vulnerability stems from usage of decodedReqPath directly in path.join without performing any path normalization i.e path.normalize in node.js

https://github.com/vendure-ecommerce/vendure/blob/801980e8f599c28c5059657a9d85dd03e3827992/packages/asset-server-plugin/src/plugin.ts#L352-L358

If the vendure service is behind some server like nginx, apache, etc. Path normalization is performed on the root server level but still the actual client's request path will be sent to vendure service but not the resultant normalized path. However, depending the type of root server one can try various payloads to bypass such normalization.

The reporter found a customer website which uses local asset plugin and using above mentioned vulnerability, and was able to find secrets like email credentials.

DOS via malformed URI

In the same code path is an additional vector for crashing the server via a malformed URI

Again from Rajesh:

There is also a potential Denial of Service (DoS) issue when incorrectly encoded URI characters are passed as part of the asset URL. When these malformed requests are processed, they can lead to system crashes or resource exhaustion, rendering the service unavailable to users. Exploit: curl --path-as-is http://localhost:3000/assets/%80package.json , here %80 is not a valid url-encoded character hence the decodeURIComponent is called on it, the entire app crashes.

[:server] /Users/abc/mywork/vendure/packages/asset-server-plugin/src/plugin.ts:353
[:server]         const decodedReqPath = decodeURIComponent(req.path);
[:server]                                ^
[:server] URIError: URI malformed

Patches

v3.0.5, v2.3.3

Workarounds

  • Use object storage rather than the local file system, e.g. MinIO or S3
  • Define middleware which detects and blocks requests with urls containing /../

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@vendure/asset-server-pluginall versions2.3.3
📦npm@vendure/asset-server-plugin3.0.0&&< 3.0.53.0.5
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @vendure/asset-server-plugin. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @vendure/asset-server-plugin to 2.3.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r9mq-3c9r-fmjq is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-r9mq-3c9r-fmjq is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-r9mq-3c9r-fmjq. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# Description ## Path traversal This vulnerability 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. From Rajesh Sharma who discovered the vulnerability: POC: `curl --path-as-is http://localhost:3000/assets/../package.json` gives you the content of package.json present in the local directory. The vulnerability stems from usage of decodedReqPath directly in path.join without performing a
O3 Security · Impact-Aware SCA

Is GHSA-r9mq-3c9r-fmjq in your dependencies?

O3 detects GHSA-r9mq-3c9r-fmjq across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.