CVE-2024-48914: @vendure/asset server plugin Vendure Asset Server Plugin Has Vulnerability
CRITICALCVE-2024-48914 is a CRITICAL (CVSS 9.1) vendure asset server plugin has vulnerability (CWE-20: Improper Input Validation) affecting @vendure/asset server plugin libraries in the npm ecosystem. The issue involves vendure asset server plugin has local file read vulnerability with assetserverplugin & localassetstoragestrategy. Remediation is available by upgrading affected packages to version 2.3.3, 3.0.5.
CVE-2024-48914 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H).
How to Fix CVE-2024-48914
To remediate this vulnerability, upgrade all affected @vendure/asset server plugin dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @vendure/asset-server-plugin@2.3.3
npm install @vendure/asset-server-plugin@3.0.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @vendure/asset-server-plugin
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-48914, inspect your project dependencies using npm:
npm ls @vendure/asset-server-plugin
Analyze the terminal output to locate any version of @vendure/asset server plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.3), your application is affected.
Note: The npm ls @vendure/asset-server-plugin command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In @vendure/asset server plugin, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-48914 Affected @vendure/asset server plugin Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@vendure/asset-server-plugin
|
npm |
< 2.3.3
|
2.3.3
|
|
@vendure/asset-server-plugin
|
npm |
≥ 3.0.0
< 3.0.5
|
3.0.5
|
References
Frequently Asked Questions
What is CVE-2024-48914?
Which @vendure/asset server plugin versions are affected?
What version fixes CVE-2024-48914?
Is @vendure/asset-server-plugin affected?
What is the CVSS score of CVE-2024-48914?
What CWE is associated with CVE-2024-48914?
How can I check npm dependencies for CVE-2024-48914?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r9mq-3c9r-fmjq",
"modified" : "2024-10-15T19:56:24Z",
"published" : "2024-10-15T18:00:02Z",
"aliases" : [ "CVE-2024-48914" ],
"summary" : "Vendure asset server plugin has local file read vulnerability with AssetServerPlugin & LocalAssetStorageStrategy",
"details" : "# Description\n\n## Path traversal\n\nThis 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.\n\nFrom Rajesh Sharma who discovered the vulnerability:\n\nPOC: `curl --path-as-is http://localhost:3000/assets/../package.json` gives you the content of package.json present in the local directory.\n\nThe vulnerability stems from usage of decodedReqPath directly in path.join without performing any path normalization i.e path.normalize in node.js\n\nhttps://github.com/vendure-ecommerce/vendure/blob/801980e8f599c28c5059657a9d85dd03e3827992/packages/asset-server-plugin/src/plugin.ts#L352-L358\n\nIf 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. \n\nThe reporter found a customer website which uses local asset plugin and using above mentioned vulnerability, and was able to find secrets like email credentials.\n\n\n## DOS via malformed URI\n\nIn the same code path is an additional vector for crashing the server via a malformed URI\n\nAgain from Rajesh:\n\nThere 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.\nExploit: `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. \n\n```\n[:server] /Users/abc/mywork/vendure/packages/asset-server-plugin/src/plugin.ts:353\n[:server] const decodedReqPath = decodeURIComponent(req.path);\n[:server] ^\n[:server] URIError: URI malformed\n```\n\n### Patches\nv3.0.5, v2.3.3\n\n### Workarounds\n- Use object storage rather than the local file system, e.g. MinIO or S3\n- Define middleware which detects and blocks requests with urls containing `/../`\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@vendure/asset-server-plugin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.3.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@vendure/asset-server-plugin"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vendure-ecommerce/vendure/security/advisories/GHSA-r9mq-3c9r-fmjq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-48914"
}, {
"type" : "WEB",
"url" : "https://github.com/vendure-ecommerce/vendure/commit/e2ee0c43159b3d13b51b78654481094fdd4850c5"
}, {
"type" : "WEB",
"url" : "https://github.com/vendure-ecommerce/vendure/commit/e4b58af6822d38a9c92a1d8573e19288b8edaa1c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vendure-ecommerce/vendure"
}, {
"type" : "WEB",
"url" : "https://github.com/vendure-ecommerce/vendure/blob/801980e8f599c28c5059657a9d85dd03e3827992/packages/asset-server-plugin/src/plugin.ts#L352-L358"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-15T18:00:02Z",
"nvd_published_at" : "2024-10-15T16:15:06Z"
}
}