Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2024-27933

Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass
Back to all
CVE

CVE-2024-27933

Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass

Deno is a JavaScript, TypeScript, and WebAssembly runtime. In version 1.39.0, use of raw file descriptors in opnodeipc_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 opnodeipc_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 opnodeipc_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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.2
-
3.1
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265, https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99, https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27933.json, https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq, https://nvd.nist.gov/vuln/detail/CVE-2024-27933, https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b, https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392

Severity

8.2

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
8.2
EPSS Probability
0.00019%
EPSS Percentile
0.05438%
Introduced Version
0
Fix Available
5a91a065b882215dde209baf626247e54c21a392

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading