8.4high
Filesystem sandbox not enforced in wasmer-cli
- Severity
- 8.4high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.60% (higher than 49% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4mq4-7rw3-vm5j
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| wasmerio wasmer | >= 3.0.0, < 4.2.4 | CVE List |
| wasmer-cli (crates.io) | from 3.0.0 before 4.2.4 | GitHub Advisory Database |
| wasmer wasmer | from 3.0.0 before 4.2.4 | NVD |
All scores
| GitHub_M | 8.4high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.4high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
As of Wasmer version v4.2.3, Wasm programs can access the filesystem outside of the sandbox.
Details
https://github.com/wasmerio/wasmer/issues/4267
PoC
A minimal Rust program:
fn main() {
let f = std::fs::OpenOptions::new()
.write(true)
.create_new(true)
.open("abc")
.unwrap();
}
This 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.
Impact
Service providers running untrusted Wasm code on Wasmer can unexpectedly expose the host filesystem.
NVD (es)
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-51661 changed 2025-04-17 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4mq4-7rw3-vm5j changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-51661 changed 2026-06-17 | Public domain |