Skip to content
Heist/ feed
Back to feed
High

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-27933
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 19:19 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 6 Mar 2024, 20:52 UTC

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.

osv:CVE-2024-27933
Complete source record
{
  "id": "e215786289b9313f202a14cee6c317502525f1bfee8e7667009ba947c3459dc6",
  "url": "https://osv.dev/vulnerability/CVE-2024-27933",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass",
    "summary": "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.",
    "evidence": "osv:CVE-2024-27933",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-27933",
      "aliases": [
        "CVE-2024-27933",
        "GHSA-6q4w-9x56-rmwq"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/denoland/deno",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5b96f7bf21392620f0047687ec3b75b25b7ea9f2"
                },
                {
                  "fixed": "55fac9f5ead6d30996400e8597c969b675c5a22b"
                },
                {
                  "fixed": "5a91a065b882215dde209baf626247e54c21a392"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "= 1.39.0"
                      },
                      {
                        "last_affected": "= 1.39.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandaloneSingleVersion"
                  },
                  {
                    "range": [
                      {
                        "fixed": "55fac9f5ead6d30996400e8597c969b675c5a22b"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5a91a065b882215dde209baf626247e54c21a392"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.39.0",
            "= 1.39.0",
            "v1.39.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27933.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.505214798Z",
      "provider": "osv",
      "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"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-863"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27933.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-27933",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498672,
  "published_at": "2024-03-06T20:52:17.599+00:00"
}