CVE-2023-28446
published 2023-03-24CVE-2023-28446: 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…
PriorityP343high8.8CVSS 3.1
AVNACLPRNUIRSUCHIHAH
EPSS
1.13%
65.0th percentile
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.
Affected
6 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| deno | deno | < 1.31.2 | 1.31.2 |
| deno | deno | >= 1.32.1 < 1.41.0 | 1.41.0 |
| deno | deno | >= 1.8.0 < 1.31.2 | 1.31.2 |
| deno | deno_runtime | >= 0.103.0 < 0.147.0 | 0.147.0 |
| deno | deno_runtime | >= 1.8.0 < 1.31.2 | 1.31.2 |
| denoland | deno | — | — |
CVSS provenance
nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
ghsa8.8HIGH
osv8.8HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
ghsa·2024-03-05·CVSS 8.8
CVE-2024-27936 [HIGH] CWE-150 Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
### Summary
A maliciously crafted permission request can show the spoofed permission prompt by inserting a broken ANSI escape sequence into the request contents.
### Details
In [the patch for CVE-2023-28446](https://github.com/denoland/deno/commit/78d430103a8f6931154ddbbe19d36f3b8630286d), Deno is stripping any ANSI escape sequences from the permission prompt, but permissions given to the program are based on the contents that contain the ANSI escape sequences.
For example, requesting the read permission with `/tmp/hello\u001b[/../../etc/hosts` as a path will display the `/tmp/hellotc/hosts` in the permission prompt, but the actual permission given to the program is `/tmp/hello\u001b[/..
OSV
Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
osv·2024-03-05·CVSS 8.8
CVE-2024-27936 [HIGH] Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping
### Summary
A maliciously crafted permission request can show the spoofed permission prompt by inserting a broken ANSI escape sequence into the request contents.
### Details
In [the patch for CVE-2023-28446](https://github.com/denoland/deno/commit/78d430103a8f6931154ddbbe19d36f3b8630286d), Deno is stripping any ANSI escape sequences from the permission prompt, but permissions given to the program are based on the contents that contain the ANSI escape sequences.
For example, requesting the read permission with `/tmp/hello\u001b[/../../etc/hosts` as a path will display the `/tmp/hellotc/hosts` in the permission prompt, but the actual permission given to the program is `/tmp/hello\u001b[/..
OSV
Interactive `run` permission prompt spoofing via improper ANSI neutralization
osv·2023-03-24
CVE-2023-28446 [HIGH] Interactive `run` permission prompt spoofing via improper ANSI neutralization
Interactive `run` permission prompt spoofing via improper ANSI neutralization
### Summary
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.
### Details
The main entry point comes down to the ability to override what the API control says ([40_process.js](https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175)). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in `op_kill`.
### PoC
This PoC works on 1.31.1, but modified versions of it work on older versions.
Make a file, e.g. `index.ts`, that uses t
GHSA
Interactive `run` permission prompt spoofing via improper ANSI neutralization
ghsa·2023-03-24
CVE-2023-28446 [HIGH] CWE-150 Interactive `run` permission prompt spoofing via improper ANSI neutralization
Interactive `run` permission prompt spoofing via improper ANSI neutralization
### Summary
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.
### Details
The main entry point comes down to the ability to override what the API control says ([40_process.js](https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175)). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in `op_kill`.
### PoC
This PoC works on 1.31.1, but modified versions of it work on older versions.
Make a file, e.g. `index.ts`, that uses t
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175https://github.com/denoland/deno/releases/tag/v1.31.2https://github.com/denoland/deno/security/advisories/GHSA-vq67-rp93-65qfhttps://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175https://github.com/denoland/deno/releases/tag/v1.31.2https://github.com/denoland/deno/security/advisories/GHSA-vq67-rp93-65qf
2023-03-24
Published