CVE-2024-38358
Symlink bypasses filesystem sandbox in wasmer
Wasmer is a web assembly (wasm) Runtime supporting WASIX, WASI and Emscripten. If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link. This issue has been addressed in commit b9483d022 which has been included in release version 4.3.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
2.9
Symlink bypasses filesystem sandbox in wasmer
Wasmer is a web assembly (wasm) Runtime supporting WASIX, WASI and Emscripten. If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link. This issue has been addressed in commit b9483d022 which has been included in release version 4.3.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-38358- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
EUVDEUVD-2024-1924
2.9
Wasmer is a web assembly (wasm) Runtime supporting WASIX, WASI and Emscripten. If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link. This issue has been addressed in commit b9483d022 which has been included in release version 4.3.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
EUVD-2024-1924- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-55f3-3qvg-8pv5
2.9
Symlink bypasses filesystem sandbox
Summary
If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link.
Details
PoC
Setup a filesystem as follows.
.
├── outside.file
└── preopen
└── dir
└── file -> ../../outside.file
Compile this Rust snippet with wasi v0.11 (for the preview1 API).
fn main() {
unsafe {
let filefd = wasi::path_open(
5,
wasi::LOOKUPFLAGS_SYMLINK_FOLLOW,
"app/dir/file",
wasi::OFLAGS_CREAT,
wasi::RIGHTS_FD_READ | wasi::RIGHTS_FD_WRITE,
0,
0,
)
.unwrap();
eprintln!("filefd: {filefd}");
let mut buf = [0u8; 10];
let iovs = [wasi::Iovec {
buf: buf.as_mut_ptr(),
buf_len: buf.len(),
}];
let read = wasi::fd_read(filefd, &iovs).unwrap();
eprintln!("read {read}: {}", String::from_utf8_lossy(&buf));
}
}
Run the compiled binary with Wasmer preopening preopen/:
wasmer run --mapdir /app:preopen a.wasm
This should not print the contents of the outside.file. Other runtimes like Wasmtime can successfully block this call. But Wasmer prints the contents of the file.
- Record
GHSA-55f3-3qvg-8pv5- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
2.9
Wasmer is a web assembly (wasm) Runtime supporting WASIX, WASI and Emscripten. If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link. This issue has been addressed in commit b9483d022 which has been included in release version 4.3.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-38358- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSV
2.9
Symlink bypasses filesystem sandbox in wasmer
Wasmer is a web assembly (wasm) Runtime supporting WASIX, WASI and Emscripten. If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link. This issue has been addressed in commit b9483d022 which has been included in release version 4.3.2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
- Record
CVE-2024-38358- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
OSVGHSA-55f3-3qvg-8pv5
2.9
Symlink bypasses filesystem sandbox
Summary
If the preopened directory has a symlink pointing outside, WASI programs can traverse the symlink and access host filesystem if the caller sets both oflags::creat and rights::fd_write. Programs can also crash the runtime by creating a symlink pointing outside with path_symlink and path_opening the link.
Details
PoC
Setup a filesystem as follows.
.
├── outside.file
└── preopen
└── dir
└── file -> ../../outside.file
Compile this Rust snippet with wasi v0.11 (for the preview1 API).
fn main() {
unsafe {
let filefd = wasi::path_open(
5,
wasi::LOOKUPFLAGS_SYMLINK_FOLLOW,
"app/dir/file",
wasi::OFLAGS_CREAT,
wasi::RIGHTS_FD_READ | wasi::RIGHTS_FD_WRITE,
0,
0,
)
.unwrap();
eprintln!("filefd: {filefd}");
let mut buf = [0u8; 10];
let iovs = [wasi::Iovec {
buf: buf.as_mut_ptr(),
buf_len: buf.len(),
}];
let read = wasi::fd_read(filefd, &iovs).unwrap();
eprintln!("read {read}: {}", String::from_utf8_lossy(&buf));
}
}
Run the compiled binary with Wasmer preopening preopen/:
wasmer run --mapdir /app:preopen a.wasm
This should not print the contents of the outside.file. Other runtimes like Wasmtime can successfully block this call. But Wasmer prints the contents of the file.
- Record
GHSA-55f3-3qvg-8pv5- CVSS 3.1
- 2.9 Low
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-22
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
wasmercrates.io |
through 4.3.1 | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-38358 is a low vulnerability (CVSS 2.9) in Wasmer, published June 7, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.20%, the 9th percentile. No source names a fixed version.
References
github.com/wasmerio/wasmer/security/advisories/GHSA-55f3-3qvg-8pv5
github.com/wasmerio/wasmer/commit/b9483d022c602b994103f78ecfe46f017f8ac662
nvd.nist.gov/vuln/detail/CVE-2024-38358
github.com/advisories/GHSA-55f3-3qvg-8pv5
github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38358.json
github.com/wasmerio/wasmer