CVE-2024-34346: Deno permission escalation vulnerability via open of privileged files with missing `--deny` flag
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.
Published May 8, 2024
Affected packages
deno
- Ecosystem
- Rust (crates.io)
- Affected
- < 1.43.1
- Fixed in
- 1.43.1
- Check
cargo tree -i deno
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Impact
Users who run code with --allow-read or --allow-write may unexpectedly end up granting additional permissions via file-system operations.
Patches
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.
Workarounds
The security sandbox in previous versions of Deno allows for denial of access to these files, but it requires an explicit addition of deny flags: --deny-read=/dev --deny-read=/sys --deny-read=/proc --deny-read=/etc --deny-write=/dev --deny-write=/sys --deny-write=/proc --deny-write=/etc. Note that symlinks in allowed locations may defeat this protection in earlier versions of Deno.
Reporters
This vulnerability was reported by a number of analysts. Thanks to [[email protected]](mailto:[email protected]), [[email protected]](mailto:[email protected]), @leesh3288, and @cristianstaicu for their reports and analysis.
Credited to mmastrac.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesCVE-2026-55517
Deno: Denial of service via non-ASCII bytes in WebSocket response headers
medium4.3Jun 17, 2026CVE-2026-49401
Deno: Permission Bypass via Unicode Normalization Mismatch on macOS (APFS)
high7.3Jun 16, 2026CVE-2026-49402
Deno: Command Injection via spawnSync & spawn on Windows
high8.1Jun 16, 2026CVE-2026-49406
Deno: BYONM module resolution allows `package.json` main path traversal to bypass `--allow-read` restrictions
medium5.5Jun 16, 2026CVE-2026-49411
Deno: Node TCPWrap numeric hostname aliases bypass --deny-net resolved-IP deny checks
medium6.5Jun 16, 2026CVE-2026-49440
Deno: Miller-Rabin Primality Test Allows Zero Rounds
high7.4Jun 16, 2026
