CVE-2025-48934 Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables

Medium 5.5 Published Updated

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.

PackageAffectedFixed in
deno crates.ioAll versions2.1.13
deno crates.ioAll versions2.1.13
deno crates.ioFrom 2.2.02.2.13
deno crates.ioFrom 2.2.02.2.13
deno_runtime crates.ioAll versions0.212.0
deno_runtime crates.ioAll versions0.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.

Sources

Also known as GHSA-7w8p-chxq-2789, JLSEC-2026-110.

Is CVE-2025-48934 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free