DenoApplication

CVE-2024-34346

CRITICAL · 9.0 CVSS v3.1 Published 2024-05-07
Fix available
A fix is available. Upgrade to 1.43.1 or later.
See remediation →
92/100
Remediation priority · Urgent
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Deno is a JavaScript, TypeScript, and WebAssembly runtime with secure defaults. The Deno sandbox may be unexpectedly weakened by allowing file read/write access to privileged files in various locations on Unix and Windows platforms. For example, reading `/proc/self/environ` may provide access equivalent to `--allow-env`, and writing `/proc/self/mem` may provide access equivalent to `--allow-all`. Users who grant read and write access to the entire filesystem may not realize that these access to these files may have additional, unintended consequences. The documentation did not reflect that this practice should be undertaken to increase the strength of the security sandbox. Users who run code with `--allow-read` or `--allow-write` may unexpectedly end up granting additional permissions via file-system operations. Deno 1.43 and above require explicit `--allow-all` access to read or write `/etc`, `/dev` on unix platform (as well as `/proc` and `/sys` on linux platforms), and any path starting with `\\` on Windows.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Deno's sandbox security is weakened when users grant `--allow-read` or `--allow-write` permissions, unexpectedly providing access to privileged system files. On Unix, reading `/proc/self/environ` can expose environment variables equivalent to `--allow-env`, and writing `/proc/self/mem` can provide root-equivalent access. On Linux, `/etc`, `/dev`, `/proc`, and `/sys` contain sensitive system resources. Windows paths starting with `\\` are similarly privileged.

MitigationUpgrade to Deno 1.43 or later, which requires explicit `--allow-all` to access these protected paths. Review existing code that uses `--allow-read` or `--allow-write` to ensure no unintended access to privileged system files occurs.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
DenoApplication
Affected:< 1.43.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Adjacent
Complexity
Low
Privileges
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check your installed Deno version
    Run `deno --version` and compare the version number to the affected range (< 1.43.1)
    Affected if The version is lower than 1.43.1
  2. Identify scripts using --allow-read permission
    Search your codebase or deployment scripts for `deno run` commands containing `--allow-read` flag without explicit path restrictions
    Affected if Scripts use --allow-read without restricting access to specific directories (e.g., --allow-read=/specific/path)
  3. Identify scripts using --allow-write permission
    Search your codebase or deployment scripts for `deno run` commands containing `--allow-write` flag without explicit path restrictions
    Affected if Scripts use --allow-write without restricting access to specific directories (e.g., --allow-write=/specific/path)
  4. Inspect for access to Unix privileged paths
    Search your Deno scripts for file read or write operations targeting /proc/self/environ, /proc/self/mem, /etc, /dev, /proc, or /sys directories
    Affected if Your code reads from or writes to any of these privileged system directories with --allow-read or --allow-write permissions
  5. Inspect for access to Windows privileged paths
    Search your Deno scripts for file operations targeting paths starting with \\ (UNC paths)
    Affected if Your code accesses UNC paths (\\server\share or \\.) with --allow-read or --allow-write permissions

You are affected if you run Deno version below 1.43.1 and your scripts use --allow-read or --allow-write permissions that could access protected system paths like /proc/self/environ, /proc/self/mem, /etc, /dev, /proc, /sys, or Windows UNC paths.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.43.1 or later
Fixed in 1.43.1
Interim mitigation

Upgrade to Deno 1.43 or later, which requires explicit `--allow-all` to access these protected paths. Review existing code that uses `--allow-read` or `--allow-write` to ensure no unintended access to privileged system files occurs.

Recommended fix High confidence

Deno 1.43.1 or later

  1. Verify current Deno version by running: deno --version
  2. Upgrade Deno to version 1.43.1 or later using your preferred installation method
  3. For fresh installation: curl -fsSL https://deno.land/install.sh | sh
  4. For existing installations using Deno's built-in updater: deno upgrade
  5. For npm-based installations: npm install -g deno
  6. After upgrade, verify the version: deno --version
  7. Ensure your code explicitly requests --allow-all if access to /etc, /dev, /proc, /sys (Linux) or \\ paths (Windows) is needed
Caveat Users granting --allow-read or --allow-write to the entire filesystem may need to add explicit --allow-all if they rely on accessing /etc, /dev, /proc, /sys (Linux) or \\ paths (Windows); the sandbox is now stricter by default

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Deno Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
15.0 hours of engineering $2,640
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-34346 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-34346 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data