Summary
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.
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.
CVE-2025-48934 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.1.13, 2.2.13, 0.212.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
deno to 2.1.13 or later; deno to 2.2.13 or later; deno_runtime to 0.212.0 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-48934? CVE-2025-48934 is a medium-severity security vulnerability in deno (rust), affecting versions < 2.1.13. It is fixed in 2.1.13, 2.2.13, 0.212.0.
- How severe is CVE-2025-48934? CVE-2025-48934 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2025-48934?
deno(rust) (versions < 2.1.13)deno_runtime(rust) (versions < 0.212.0)
- Is there a fix for CVE-2025-48934? Yes. CVE-2025-48934 is fixed in 2.1.13, 2.2.13, 0.212.0. Upgrade to this version or later.
- Is CVE-2025-48934 exploitable, and should I be worried? Whether CVE-2025-48934 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-48934 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-48934?
- Upgrade
denoto 2.1.13 or later - Upgrade
denoto 2.2.13 or later - Upgrade
deno_runtimeto 0.212.0 or later
- Upgrade