CVE-2025-48934
published 2025-06-04CVE-2025-48934: 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…
PriorityP428medium5.3CVSS 3.1
AVNACLPRNUINSUCLINAN
EPSS
0.43%
36.4th percentile
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.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| deno | deno | < 2.1.13 | 2.1.13 |
| deno | deno | >= 0 < 2.1.13 | 2.1.13 |
| deno | deno | >= 2.2.0 < 2.2.13 | 2.2.13 |
| deno | deno | >= 2.2.0 < 2.2.13 | 2.2.13 |
| deno | deno_runtime | >= 0 < 0.212.0 | 0.212.0 |
| denoland | deno | < 2.1.13 | 2.1.13 |
| denoland | deno | — | — |
CVSS provenance
nvdv3.15.3MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
nvdv4.05.5MEDIUMCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
osv·2025-06-04
CVE-2025-48934 [MEDIUM] Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
### Summary
The [Deno.env.toObject](https://docs.deno.com/api/deno/~/Deno.Env.toObject) method ignores any variables listed in the `--deny-env` option of the `deno run` command. When looking at the [documentation](https://docs.deno.com/runtime/fundamentals/security/#environment-variables) of the `--deny-env` option this might lead to a false impression that variables listed in the option are impossible to read.
### PoC
```
export AWS_SECRET_ACCESS_KEY=my-secret-aws-key
# Works as expected. The program stops with a "NotCapable" error message
echo 'console.log(Deno.env.get("AWS_SECRET_ACCESS_KEY"));' | deno run \
--allow-env \
--deny-env=AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY -
# All en
GHSA
Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
ghsa·2025-06-04
CVE-2025-48934 [MEDIUM] CWE-201 Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
### Summary
The [Deno.env.toObject](https://docs.deno.com/api/deno/~/Deno.Env.toObject) method ignores any variables listed in the `--deny-env` option of the `deno run` command. When looking at the [documentation](https://docs.deno.com/runtime/fundamentals/security/#environment-variables) of the `--deny-env` option this might lead to a false impression that variables listed in the option are impossible to read.
### PoC
```
export AWS_SECRET_ACCESS_KEY=my-secret-aws-key
# Works as expected. The program stops with a "NotCapable" error message
echo 'console.log(Deno.env.get("AWS_SECRET_ACCESS_KEY"));' | deno run \
--allow-env \
--deny-env=AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY -
# All en
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://docs.deno.com/api/deno/~/Deno.Env.toObjecthttps://docs.deno.com/runtime/fundamentals/security/#environment-variableshttps://github.com/denoland/deno/commit/2959e083912420988066a001c2b2d6732a1b562fhttps://github.com/denoland/deno/commit/946ccda1aa19a00c478a5e6826b75053b050d753https://github.com/denoland/deno/pull/29079https://github.com/denoland/deno/security/advisories/GHSA-7w8p-chxq-2789https://github.com/denoland/deno/security/advisories/GHSA-7w8p-chxq-2789
2025-06-04
Published