{"id":"CVE-2024-27933","published":"2024-03-06T20:52:17Z","modified":"2024-08-02T19:55:09Z","title":"Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass","vendor":"denoland","product":"deno","tier":"tail","description":{"text":"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.\n\nUse 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.\n\nThis 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.\n\nVersion 1.39.1 fixes the bug.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":8.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02276,"percentile":0.83523,"provenance":"source"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99","tags":["x_refsource_MISC"]}],"priority":{"score":22.5,"factors":[{"name":"EPSS percentile","points":16.7},{"name":"CVSS severity","points":5.81}]},"vendorSlug":"denoland","affectedVersions":[{"vendor":"denoland","product":"deno","versions":["= 1.39.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-08-02T19:54:07.494367Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"deno","vulnerableRanges":[">=1.39.0, <1.39.1"],"patched":["1.39.1"],"from":["GHSA-6q4w-9x56-rmwq"],"provenance":"source"}],"summary":{"text":"Deno, a JavaScript, TypeScript, and WebAssembly runtime, contains a flaw in its op_node_ipc_pipe() operation used by Node child_process IPC, where raw file descriptors are passed in and closed prematurely, causing arbitrary file descriptors to be closed. An attacker who controls code executed inside a Deno runtime, with local access and existing privileges, can close standard input and re-open it as a different resource to silently bypass permission prompts and achieve arbitrary code execution on the host regardless of configured permissions.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:41:15Z"},"euvd":{"id":"EUVD-2024-0849","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-denoland-deno-cve-2024-27933","children":[{"from":"CVE-2024-27933","to":"CVE-2024-37150","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["cli/args/mod.rs"],"commits":["https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b","https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392","https://github.com/denoland/deno/commit/566adb7c0a0c0845e90a6e867a2c0ef5d2ada575"],"basis":"rarely changed file"}]},{"from":"CVE-2024-27933","to":"CVE-2025-24015","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["ext/node/lib.rs"],"commits":["https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b","https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392","https://github.com/denoland/deno/commit/0d1beed2e3633d71d5e288e0382b85be361ec13d","https://github.com/denoland/deno/commit/4f27d7cdc02e3edfb9d36275341fb8185d6e99ed"],"basis":"rarely changed file"}]},{"from":"CVE-2024-27933","to":"CVE-2026-27190","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["ext/node/polyfills/internal/child_process.ts"],"commits":["https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b","https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392","https://github.com/denoland/deno/commit/9132ad958c83a0d0b199de12b69b877f63edab4c"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2023-28446","published":"2023-03-24","fixed":"1.31.2","kev":false},{"cve":"CVE-2023-33966","published":"2023-05-31","fixed":"1.34.1","kev":false},{"cve":"CVE-2024-27935","published":"2024-03-06","fixed":"1.36.3","kev":false},{"cve":"CVE-2024-27933","published":"2024-03-06","fixed":"1.39.1","kev":false},{"cve":"CVE-2024-27934","published":"2024-03-06","fixed":"1.40.3","kev":false,"link":{"from":"CVE-2024-27933","to":"CVE-2024-27934","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:deno","fromFixed":"1.39.1","toFixed":"1.40.3","daysApart":0}]}},{"cve":"CVE-2024-27932","published":"2024-03-06","fixed":"1.40.4","kev":false},{"cve":"CVE-2024-27936","published":"2024-03-06","fixed":"1.41.0","kev":false}],"package":"crates.io:deno"}}