CVE-2024-32477 Race condition when flushing input stream leads to permission prompt bypass

High 7.7 Published Updated

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.

Weakness: CWE-78, CWE-362

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.

Sources

Also known as GHSA-95cj-3hr2-7j5j, JLSEC-2026-106.

Is CVE-2024-32477 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free