
Loading

Loading
We use strictly necessary cookies to run this site, and analytics cookies to understand how it's used. See our Privacy Policy for details.
A GitHub-reviewed security advisory, not necessarily under active exploitation the way our CISA KEV advisories are, but a real, disclosed vulnerability in an open-source dependency.
Affected packages
Vulnerable: < 24.0.11
Patched in 24.0.11
Vulnerable: >= 25.0.0, < 36.0.12
Patched in 36.0.12
Vulnerable: >= 37.0.0, < 45.0.3
Patched in 45.0.3
Vulnerable: >= 46.0.0, < 46.0.1
Patched in 46.0.1
Details
Wasmtime's WASI filesystem implementation lets a guest with a read-only source file capability overwrite that file by hard-linking it into another preopen that allows file writes. An attacker who can run a WASI guest can bypass WasiCtxBuilder per-preopen FilePerms and modify host files that were exposed as FilePerms::READ.
This attack is possible through the wasip1, wasip2, and wasip3 interfaces to the WASI filesystem.
This attack is also possible through an indirection of renaming a hardlink into another preopen.
WasiCtxBuilder::preopened_dir documents file_perms as the maximum permissions usable for files in that preopen. However, hard-link creation and renaming only checked directory mutation for permission, and not whether the file permissions matched.
This makes an attack possible where:
target exists in a preopen with only FilePerms::READalias, with destination to the target, is created in a preopen with FilePerms::READ | FilePerms::WRITEalias for writing, in which they can overwrite targetThe same attack is possible by way of renaming:
target exists in a preopen with only FilePerms::READalias, with destination to the target, is created in that same preopenalias file is renamed into a preopen with FilePerms::READ | FilePerms::WRITEalias for writing, in which they can overwrite targetSymbolic links are not a vector for this attack because the wasi-filesystem interfaces already enforces that the destination for a symlink is under the same preopen. We do not believe there are any other vectors to this attack because there are no other wasi filesystem interfaces that take multiple borrows of a descriptor resource for e.g. the source and destination in different descriptors.
The definition of Dir::link_at and Dir::rename_at in wasmtime-wasi's src/filesystem.rs now have an additional permissions check that ensures the source and destination values for the directory permissions perms and the file permissions file_perms are identical.
if self.perms != new_dir.perms || self.file_perms != new_dir.file_perms {
return Err(ErrorCode::NotPermitted);
}
Only wasmtime-wasi embeddings that use a combination of DirPerms::MUTATE with FilePerms::READ, as well as using a second preopen with higher permissions (FilePerms::WRITE as well), are affected by this bug, e.g. those that use in the WasiCtxBuilder:
builder.preopened_dir("readwrite", "readwrite", DirPerms::READ | DirPerms::MUTATE, FilePerms::READ | FilePerms::WRITE);
builder.preopened_dir("readonly", "readonly", DirPerms::READ | DirPerms::MUTATE, FilePerms::READ);
In particular, the Wasmtime project's wasmtime-cli's use of wasmtime-wasi is not affected, because it always sets FilePerms::all() for all preopens.
EPSS, exploit probability
Low0.17%
estimated chance of real-world exploitation in the next 30 days, higher than 6.0% of every CVE FIRST.org scores
Refreshed 10/16/2026, via FIRST.org's EPSS model, not CVSS, this measures likelihood of exploitation, not how severe it would be.
Talk to us about this
Find out whether this dependency (or others like it) is actually reachable in your codebase.
Get help patching, or building dependency-scanning into your pipeline going forward.
A secure code review or supply chain review finds this before an advisory does.