CVE-2024-32477 Race condition when flushing input stream leads to permission prompt bypass
Attackers can bypass Deno permission prompts via a race condition involving ANSI escape sequences, allowing unauthorized execution of unsafe actions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-32477?
CVE-2024-32477 is a high-severity vulnerability in denoland deno, published on 18 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. By using ANSI escape sequences and a race between `libc::tcflush(0, libc::TCIFLUSH)` and reading standard input, it's possible to manipulate the permission prompt and force it to allow an unsafe action regardless of the user input. Some ANSI escape sequences act as a info request to the master terminal emulator and the terminal emulator sends back the reply in the PTY channel. standard streams also use this channel to send and get data. For example the `\033[6n` sequence requests the current cursor position. These sequences allow us to append data to the standard input of Deno. This vulnerability allows an attacker to bypass Deno permission policy. This vulnerability is fixed in 1.42.2.
Which versions are affected by CVE-2024-32477?
It affects 1 product.
Products include Deno Deno.
How do I fix CVE-2024-32477?
Upgrade to a fixed version.
Is CVE-2024-32477 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-32477 exists.
Other vulnerabilities in denoland deno
- CVE-2023-28445 Deno improperly handles resizable ArrayBuffer
- CVE-2022-24783 Sandbox bypass leading to arbitrary code execution in Deno
- CVE-2021-32619 Static imports inside dynamically imported modules do not adhere to permission checks
- CVE-2026-22863 Deno node:crypto doesn't finalize cipher
- CVE-2024-27936 Deno interactive permission prompt spoofing via improper ANSI stripping
Sources
Also known as GHSA-95cj-3hr2-7j5j, JLSEC-2026-106.