CVE-2025-48934

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

Published Jun 4, 2025 CVSS 4.0 · 5.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-16913 Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
Github GHSA Github GHSA GHSA-7w8p-chxq-2789 Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
History
Type Values Removed Values Added
Metrics epss

{'score': 0.00042}

epss

{'score': 0.00058}

Type Values Removed Values Added
First Time appeared Deno
Deno deno
CPEs cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*
Vendors & Products Deno
Deno deno
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables
Weaknesses CWE-201
References
Metrics cvssV4_0

{'score': 5.5, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 4, 2025, 7:32 PM
Reserved
May 28, 2025, 6:49 PM
Status
Analyzed
Published
Jun 4, 2025, 8:15 PM
Modified
Jun 17, 2026, 9:30 AM