Medium severity · published Jun 4, 2025
CVE-2025-48934
Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
5.3
CVSS
0.4%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 37% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
DE
deno · denoland
< 2.1.13; >= 2.2.0, < 2.2.13 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2025-48934
CVE.org
https://www.cve.org/CVERecord?id=CVE-2025-48934
Product
https://docs.deno.com/api/deno/~/Deno.Env.toObject
Product
https://docs.deno.com/runtime/fundamentals/security/#environment-variables
Patch
https://github.com/denoland/deno/commit/2959e083912420988066a001c2b2d6732a1b562f
Patch
https://github.com/denoland/deno/commit/946ccda1aa19a00c478a5e6826b75053b050d753
Issue Tracking
https://github.com/denoland/deno/pull/29079
Exploit
https://github.com/denoland/deno/security/advisories/GHSA-7w8p-chxq-2789
More from deno
9.8
CVE-2026-32260
Command Injection via incomplete shell metacharacter blocklist in node:child_process (bypass of CVE-2026-27190 fix)
9.8
CVE-2026-27190
Deno has a Command Injection via Incomplete shell metacharacter blocklist in node:child_process
9.8
CVE-2026-22864
Deno has an incomplete fix for command-injection prevention on Windows — case-insensitive extension bypass
9.8
CVE-2023-33966
Deno missing "--allow-net" permission check for built-in Node modules
9.8
CVE-2023-28445
Deno improperly handles resizable ArrayBuffer
