{"id":"CVE-2025-48934","published":"2025-06-04T19:21:17Z","modified":"2025-06-04T19:32:14Z","title":"Deno.env.toObject() ignores the variables listed in --deny-env and returns all environment variables","vendor":"denoland","product":"deno","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00444,"percentile":0.39516,"provenance":"source"},"cwes":[{"id":"CWE-201","name":"Insertion of Sensitive Information Into Sent Data"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-7w8p-chxq-2789","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/denoland/deno/pull/29079","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/commit/2959e083912420988066a001c2b2d6732a1b562f","tags":["x_refsource_MISC"]},{"url":"https://github.com/denoland/deno/commit/946ccda1aa19a00c478a5e6826b75053b050d753","tags":["x_refsource_MISC"]},{"url":"https://docs.deno.com/api/deno/~/Deno.Env.toObject","tags":["x_refsource_MISC"]},{"url":"https://docs.deno.com/runtime/fundamentals/security/#environment-variables","tags":["x_refsource_MISC"]}],"priority":{"score":11.8,"factors":[{"name":"EPSS percentile","points":7.9},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"denoland","affectedVersions":[{"vendor":"denoland","product":"deno","versions":["< 2.1.13",">= 2.2.0, < 2.2.13"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-06-04T19:32:01.410953Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"deno","vulnerableRanges":["<2.1.13",">=2.2.0, <2.2.13"],"patched":["2.1.13","2.2.13"],"from":["GHSA-7w8p-chxq-2789"],"provenance":"source"},{"ecosystem":"crates.io","package":"deno_runtime","vulnerableRanges":["<0.212.0"],"patched":["0.212.0"],"from":["GHSA-7w8p-chxq-2789"],"provenance":"source"}],"summary":{"text":"Deno's Deno.env.toObject() method in the Deno runtime fails to honour variables listed in the --deny-env option of deno run, so it returns every environment variable, including those the user intended to block. An attacker who can get malicious code to run inside a Deno process needs no network access, authentication, or user interaction, and the flaw only matters where software relies on --deny-env to protect a few sensitive variables while allowing the rest.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:58:12Z"},"euvd":{"id":"EUVD-2025-16913","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-denoland-deno-cve-2025-48888","parents":[{"from":"CVE-2025-48888","to":"CVE-2025-48934","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["runtime/permissions/lib.rs"],"commits":["https://github.com/denoland/deno/commit/2f0fae9d9071dcaf0a689bc7097584b1b9ebc8db","https://github.com/denoland/deno/commit/9d665572d3cd39f997e29e6daac7c1102fc5c04f","https://github.com/denoland/deno/commit/2959e083912420988066a001c2b2d6732a1b562f","https://github.com/denoland/deno/commit/946ccda1aa19a00c478a5e6826b75053b050d753"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-21620","published":"2025-01-06","fixed":"2.1.2","kev":false},{"cve":"CVE-2025-24015","published":"2025-06-03","fixed":"2.1.7","kev":false,"link":{"from":"CVE-2025-24015","to":"CVE-2025-48934","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:deno","fromFixed":"2.1.7","toFixed":"2.1.13","daysApart":1}]}},{"cve":"CVE-2025-48935","published":"2025-06-04","fixed":"2.2.5","kev":false,"link":{"from":"CVE-2025-48935","to":"CVE-2025-48934","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:deno","fromFixed":"2.2.5","toFixed":"2.2.13","daysApart":0}]}},{"cve":"CVE-2025-48934","published":"2025-06-04","fixed":"2.2.13","kev":false},{"cve":"CVE-2025-48888","published":"2025-06-04","fixed":"2.3.2","kev":false},{"cve":"CVE-2025-61787","published":"2025-10-08","fixed":"2.5.2","kev":false},{"cve":"CVE-2025-61785","published":"2025-10-08","fixed":"2.5.3","kev":false}],"package":"crates.io:deno"}}