CVE-2024-27933 Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass

High 8.3 Published Updated

Attackers can bypass Deno permission prompts by closing standard input via IPC, enabling arbitrary code execution on the host.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-27933?

CVE-2024-27933 is a high-severity vulnerability in denoland deno, published on 6 Mar 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. In version 1.39.0, use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors, allowing standard input to be re-opened as a different resource resulting in permission prompt bypass. Node child_process IPC relies on the JS side to pass the raw IPC file descriptor to `op_node_ipc_pipe()`, which returns a `IpcJsonStreamResource` ID associated with the file descriptor. On closing the resource, the raw file descriptor is closed together.

Use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors. This allow standard input (fd 0) to be closed and re-opened for a different resource, which allows a silent permission prompt bypass. This is exploitable by an attacker controlling the code executed inside a Deno runtime to obtain arbitrary code execution on the host machine regardless of permissions.

This bug is known to be exploitable. There is a working exploit that achieves arbitrary code execution by bypassing prompts from zero permissions, additionally abusing the fact that Cache API lacks filesystem permission checks. The attack can be conducted silently as stderr can also be closed, suppressing all prompt outputs.

Version 1.39.1 fixes the bug.

Weakness: CWE-863

Which versions are affected by CVE-2024-27933?

2 open source packages ship an affected version, including deno. It affects 1 product.

PackageAffectedFixed in
deno crates.ioFrom 1.39.01.39.1
deno crates.ioFrom 1.39.01.39.1

Products include Deno Deno.

How do I fix CVE-2024-27933?

Upgrade deno to 1.39.1 or later.

Is CVE-2024-27933 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27933 exists.

Sources

Also known as GHSA-6q4w-9x56-rmwq.

Is CVE-2024-27933 in your software?

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

Check your SBOMs for free