CVE-2025-48934 Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
Attackers can bypass --deny-env restrictions to read all environment variables, including secrets, via Deno.env.toObject().
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-48934?
CVE-2025-48934 is a medium-severity vulnerability in denoland deno, published on 4 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Prior to versions 2.1.13 and 2.2.13, the `Deno.env.toObject` method ignores any variables listed in the `--deny-env` option of the `deno run` command. When looking at the documentation of the `--deny-env` option this might lead to a false impression that variables listed in the option are impossible to read. Software relying on the combination of both flags to allow access to most environment variables except a few sensitive ones will be vulnerable to malicious code trying to steal secrets using the `Deno.env.toObject()` method. Versions 2.1.13 and 2.2.13 contains a patch.
Weakness: CWE-201
Which versions are affected by CVE-2025-48934?
6 open source packages ship an affected version, including deno and deno_runtime. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
deno crates.io | All versions | 2.1.13 |
deno crates.io | All versions | 2.1.13 |
deno crates.io | From 2.2.0 | 2.2.13 |
deno crates.io | From 2.2.0 | 2.2.13 |
deno_runtime crates.io | All versions | 0.212.0 |
deno_runtime crates.io | All versions | 0.212.0 |
Products include Deno Deno.
How do I fix CVE-2025-48934?
Upgrade deno to a fixed version for your release line: 2.1.13 or 2.2.13.
Is CVE-2025-48934 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-48934 exists.
Other vulnerabilities in denoland deno
- CVE-2023-28445 Deno improperly handles resizable ArrayBuffer
- CVE-2022-24783 Sandbox bypass leading to arbitrary code execution in Deno
- CVE-2021-32619 Static imports inside dynamically imported modules do not adhere to permission checks
- CVE-2026-22863 Deno node:crypto doesn't finalize cipher
- CVE-2024-27936 Deno interactive permission prompt spoofing via improper ANSI stripping
Sources
Also known as GHSA-7w8p-chxq-2789, JLSEC-2026-110.