{"id":"CVE-2024-48914","aliases":["CVE-2024-48914","GHSA-r9mq-3c9r-fmjq"],"related":[],"kind":"vulnerability","state":"published","title":"Vendure asset server plugin has local file read vulnerability with AssetServerPlugin & LocalAssetStorageStrategy","summary":"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 `/../`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 `/../`.","source":"cvelist"},{"lang":"en","text":"# 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 `/../`","format":"markdown","source":"ghsa"},{"lang":"es","text":"Vendure es una plataforma de comercio sin interfaz gráfica de código abierto. Antes de las versiones 3.0.5 y 2.3.3, una vulnerabilidad en el complemento de servidor de activos de Vendure permitía a un atacante crear una solicitud que pudiera atravesar el sistema de archivos del servidor y recuperar el contenido de archivos arbitrarios, incluidos datos confidenciales como archivos de configuración, variables de entorno y otros datos críticos almacenados en el servidor. En la misma ruta de código hay un vector adicional para hacer que el servidor se bloquee mediante una URL mal formada. Hay parches disponibles en las versiones 3.0.5 y 2.3.3. También hay algunos workarounds disponibles. Se puede utilizar el almacenamiento de objetos en lugar del sistema de archivos local, por ejemplo, MinIO o S3, o definir un middleware que detecte y bloquee las solicitudes con URL que contengan `/../`.","source":"nvd"}],"published":"2024-10-15T16:08:29.033Z","modified":"2026-06-17T07:59:01.720Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-22"],"affected":[{"ranges":[{"version":"< 2.3.3","status":"affected"},{"version":">= 3.0.0, < 3.0.5","status":"affected"}],"vendor":"vendure-ecommerce","product":"vendure","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"2.3.3","status":"affected"},{"type":"custom","introduced":"0","lastAffected":"3.0.0","status":"affected"},{"type":"custom","introduced":"0","fixed":"3.0.5","status":"affected"}],"vendor":"vendure","product":"vendure","cpe":"cpe:2.3:a:vendure:vendure:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.3.3"}],"ecosystem":"npm","package":"@vendure/asset-server-plugin","purl":"pkg:npm/%40vendure/asset-server-plugin","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.5"}],"ecosystem":"npm","package":"@vendure/asset-server-plugin","purl":"pkg:npm/%40vendure/asset-server-plugin","source":"ghsa"}],"references":[{"url":"https://github.com/vendure-ecommerce/vendure/security/advisories/GHSA-r9mq-3c9r-fmjq","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vendure-ecommerce/vendure/commit/e2ee0c43159b3d13b51b78654481094fdd4850c5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vendure-ecommerce/vendure/commit/e4b58af6822d38a9c92a1d8573e19288b8edaa1c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/vendure-ecommerce/vendure/blob/801980e8f599c28c5059657a9d85dd03e3827992/packages/asset-server-plugin/src/plugin.ts#L352-L358","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-48914","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vendure-ecommerce/vendure","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-10-15T18:54:53.009Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-48914","url":"https://www.cve.org/CVERecord?id=CVE-2024-48914","licence":"CVE Terms of Use","modified":"2024-10-15T18:56:17.334Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r9mq-3c9r-fmjq","url":"https://github.com/advisories/GHSA-r9mq-3c9r-fmjq","licence":"CC-BY-4.0","modified":"2024-10-15T19:56:24.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-48914","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-48914","licence":"Public domain","modified":"2026-06-17T07:59:01.720Z"}],"updatedAt":"2026-11-25T22:58:46.763Z","epss":{"score":0.60416,"percentile":0.99159,"date":"2026-12-01T12:00:22.000Z"}}