{"id":"CVE-2023-51661","aliases":["CVE-2023-51661","GHSA-4mq4-7rw3-vm5j"],"related":[],"kind":"vulnerability","state":"published","title":"Filesystem sandbox not enforced in wasmer-cli","summary":"Wasmer is a WebAssembly runtime that enables containers to run anywhere: from Desktop to the Cloud, Edge and even the browser. Wasm programs can access the filesystem outside of the sandbox. Service providers running untrusted Wasm code on Wasmer can unexpectedly expose the host filesystem. This vulnerability has been patched in version 4.2.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Wasmer is a WebAssembly runtime that enables containers to run anywhere: from Desktop to the Cloud, Edge and even the browser. Wasm programs can access the filesystem outside of the sandbox. Service providers running untrusted Wasm code on Wasmer can unexpectedly expose the host filesystem. This vulnerability has been patched in version 4.2.4.","source":"cvelist"},{"lang":"en","text":"### Summary\nAs of Wasmer version v4.2.3, Wasm programs can access the filesystem outside of the sandbox.\n\n### Details\nhttps://github.com/wasmerio/wasmer/issues/4267\n\n### PoC\nA minimal Rust program:\n\n```\nfn main() {\n    let f = std::fs::OpenOptions::new()\n        .write(true)\n        .create_new(true)\n        .open(\"abc\")\n        .unwrap();\n}\n```\n\nThis should be compiled with `cargo build --target wasm32-wasi`. The compiled program, when run with wasmer WITHOUT `--dir`, can still create a file in the working directory.\n\n### Impact\nService providers running untrusted Wasm code on Wasmer can unexpectedly expose the host filesystem.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Wasmer es un runtime de WebAssembly que permite que los contenedores se ejecuten en cualquier lugar: desde el escritorio hasta la nube, Edge e incluso el navegador. Los programas Wasm pueden acceder al sistema de archivos fuera del entorno limitado. Los proveedores de servicios que ejecutan código Wasm que no es de confianza en Wasmer pueden exponer inesperadamente el sistema de archivos del host. Esta vulnerabilidad ha sido parcheada en la versión 4.2.4.","source":"nvd"}],"published":"2023-12-13T13:32:38.000Z","modified":"2026-09-10T03:49:59.270Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","score":8.6,"rating":"HIGH"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"version":">= 3.0.0, < 4.2.4","status":"affected"}],"vendor":"wasmerio","product":"wasmer","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"4.2.4"}],"ecosystem":"crates.io","package":"wasmer-cli","purl":"pkg:cargo/wasmer-cli","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.0.0","fixed":"4.2.4"}],"vendor":"wasmer","product":"wasmer","cpe":"cpe:2.3:a:wasmer:wasmer:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/wasmerio/wasmer/security/advisories/GHSA-4mq4-7rw3-vm5j","tags":["exploit","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/wasmerio/wasmer/issues/4267","tags":["issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/wasmerio/wasmer/commit/4d63febf9d8b257b0531963b85df48d45d0dbf3c","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-51661","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/wasmerio/wasmer/commit/e3923612c23123025c26f982d390e34df7df030f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/wasmerio/wasmer","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2024-01-02T16:14:30.366Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-51661","url":"https://www.cve.org/CVERecord?id=CVE-2023-51661","licence":"CVE Terms of Use","modified":"2025-04-17T20:29:41.019Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4mq4-7rw3-vm5j","url":"https://github.com/advisories/GHSA-4mq4-7rw3-vm5j","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:59.270Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-51661","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-51661","licence":"Public domain","modified":"2026-06-17T06:41:24.997Z"}],"updatedAt":"2026-11-25T22:58:31.625Z","epss":{"score":0.00595,"percentile":0.49803,"date":"2026-12-01T12:00:22.000Z"}}