Loading...
Skip to main content

CVE-2024-48914 — Vulnerability in @vendure/asset-server-plugin —...

CRITICAL

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

Published October 15, 2024Updated October 15, 2024Source: osv

Summary

# 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 `/../`

Advisory Timeline

  • First published October 15, 2024 (727 days ago).
  • Last revised October 15, 2024 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @vendure/asset-server-plugin to 2.3.3 or later
npm install @vendure/asset-server-plugin@2.3.3
npm
Update @vendure/asset-server-plugin to 3.0.5 or later
npm install @vendure/asset-server-plugin@3.0.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@vendure/asset-server-plugin
npm
All versions2.3.3
@vendure/asset-server-plugin
npm
All versions3.0.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE
  • CWE-22
    Path TraversalMITRE

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
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

Frequently Asked Questions

What is CVE-2024-48914?
Vendure asset server plugin has local file read vulnerability with AssetServerPlugin & LocalAssetStorageStrategy 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-2024-48914?
CVE-2024-48914 affects @vendure/asset-server-plugin. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-48914 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-r9mq-3c9r-fmjq

Related CVEs

  • CVE-2026-63472
    CRITICAL

    Vendure affected by external-authentication account takeover: external login linked to a pre-existing account by email without verification

  • CVE-2026-40887
    CRITICAL

    @vendure/core has a SQL Injection vulnerability

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

  • CVE-2026-63459
    HIGH

    Vendure has stored XSS in the Admin Dashboard via unsafe HTML-stripping (innerHTML) of entity descriptions

Check if you're affected

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

Scan Your Dependencies