8.5high
Deno contains a permission escalation via open of privileged files with missing `--deny` flag
- Severity
- 8.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.53% (higher than 38% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-23rx-c3g5-hv9w
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| denoland deno | < 1.43.0 | CVE List |
| deno deno | before 1.43.0, before 1.43.1 | CVE List, NVD |
| deno (crates.io) | before 1.43.1 | GitHub Advisory Database |
All scores
| GitHub_M | 8.5high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 8.4high CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H |
| NVD | 9.0critical CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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 oliver@secfault-security.com, finn@secfault-security.com, @leesh3288, and @cristianstaicu for their reports and analysis.
NVD (es)
Deno es un tiempo de ejecución de JavaScript, TypeScript y WebAssembly con valores predeterminados seguros. La sandbox de Deno puede verse debilitado inesperadamente al permitir el acceso de lectura/escritura de archivos privilegiados en varias ubicaciones en plataformas Unix y Windows. Por ejemplo, leer `/proc/self/environ` puede proporcionar un acceso equivalente a `--allow-env`, y escribir `/proc/self/mem` puede proporcionar un acceso equivalente a `--allow-all`. Es posible que los usuarios que otorgan acceso de lectura y escritura a todo el sistema de archivos no se den cuenta de que este acceso a estos archivos puede tener consecuencias adicionales no deseadas. La documentación no refleja que esta práctica deba llevarse a cabo para aumentar la solidez del entorno limitado de seguridad. Los usuarios que ejecutan código con `--allow-read` o `--allow-write` pueden terminar inesperadamente otorgando permisos adicionales a través de operaciones del sistema de archivos. Deno 1.43 y superiores requieren acceso explícito `--allow-all` para leer o escribir `/etc`, `/dev` en plataformas Unix (así como `/proc` y `/sys` en plataformas Linux), y cualquier ruta que comienza con `\\` en Windows.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-34346 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-23rx-c3g5-hv9w changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-34346 changed 2026-06-17 | Public domain |