Deno is vulnerable to interactive `run` permission prompt spoofing via improper ANSI neutralization
denoland deno
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| deno_runtime crates.io |
|
|
| deno crates.io |
|
|
denoland deno
| Product | Affected | Fixed in |
|---|---|---|
| deno_runtime crates.io |
|
|
| deno crates.io |
|
|
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.
From the CVE record · GitHub_M
Deno does not filter ANSI characters from program names in `op_spawn_child` and `op_kill` prompts. A malicious program can clear the first two lines of an interactive prompt and replace them with chosen text, misleading a user about which program will run. Systems without an interactive prompt, such as headless servers, cannot be exploited this way.
Engineers using the crates.io `deno` or `deno_runtime` packages at versions 1.8.0 or later but earlier than 1.31.2 should check their deployments.