Skip to main content

CVE-2025-48934: CWE-201: Insertion of Sensitive Information Into Sent Data in denoland deno

Medium
VulnerabilityCVE-2025-48934cvecve-2025-48934cwe-201
Published: Wed Jun 04 2025 (06/04/2025, 19:21:17 UTC)
Source: CVE Database V5
Vendor/Project: denoland
Product: deno

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.

AI-Powered Analysis

AILast updated: 07/07/2025, 02:28:14 UTC

Technical Analysis

CVE-2025-48934 is a medium-severity vulnerability affecting the Deno runtime environment, specifically versions prior to 2.1.13 and between 2.2.0 and 2.2.13. Deno is a secure runtime for JavaScript, TypeScript, and WebAssembly, designed to provide improved security and developer experience over Node.js. The vulnerability arises from improper handling of environment variable restrictions when using the `--deny-env` flag in conjunction with the `Deno.env.toObject()` method. The `--deny-env` option is intended to prevent access to specified sensitive environment variables during runtime. However, due to a flaw, `Deno.env.toObject()` ignores the variables listed in `--deny-env`, allowing malicious code to retrieve environment variables that were supposed to be blocked. This behavior can mislead developers into a false sense of security, as the documentation implies that variables listed in `--deny-env` are inaccessible. Consequently, software relying on this mechanism to protect secrets (such as API keys, credentials, or tokens) may inadvertently expose sensitive information to unauthorized code execution contexts. The vulnerability does not require authentication or user interaction and can be exploited remotely if an attacker can execute code within the affected Deno environment. The issue was addressed in versions 2.1.13 and 2.2.13 by correcting the environment variable filtering logic. The CVSS 4.0 base score is 5.5, reflecting a medium impact with network attack vector, low attack complexity, no privileges or user interaction required, and limited confidentiality and integrity impact. No known exploits are reported in the wild as of the publication date.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to applications and services built on the Deno runtime that rely on environment variables to store sensitive configuration data. Exposure of environment variables can lead to leakage of secrets such as database credentials, API keys, or cryptographic tokens, potentially enabling further unauthorized access or data breaches. Given the increasing adoption of Deno in modern web and serverless applications, especially among startups and development teams favoring TypeScript, the risk is non-negligible. Organizations in sectors handling sensitive personal data (e.g., finance, healthcare, telecommunications) could face regulatory repercussions under GDPR if secret leakage leads to data breaches. Additionally, compromised secrets could facilitate lateral movement within corporate networks or cloud environments, escalating the severity of attacks. The medium severity rating suggests that while the vulnerability is not trivially exploitable at scale, targeted attacks against vulnerable Deno deployments could have significant consequences. Since exploitation requires code execution within the Deno environment, the threat is higher in scenarios where untrusted code execution is possible, such as multi-tenant platforms, CI/CD pipelines, or serverless functions.

Mitigation Recommendations

European organizations should immediately upgrade all Deno runtime instances to versions 2.1.13 or 2.2.13 and later, where the vulnerability is patched. Beyond patching, developers should avoid relying solely on the `--deny-env` flag for protecting sensitive environment variables. Instead, implement defense-in-depth by: 1) Minimizing the use of environment variables for secrets; prefer dedicated secret management solutions (e.g., HashiCorp Vault, AWS Secrets Manager) with strict access controls. 2) Restricting code execution contexts to trusted code only, preventing untrusted or third-party code from running within the same Deno environment. 3) Conducting thorough code reviews and static analysis to detect potential misuse of `Deno.env.toObject()` or other environment variable access patterns. 4) Employing runtime monitoring and anomaly detection to identify unexpected access to environment variables. 5) Educating developers about the limitations of `--deny-env` and encouraging explicit secret handling practices. Finally, organizations should audit existing deployments to identify any exposure of sensitive environment variables and rotate any secrets that may have been compromised prior to patching.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-05-28T18:49:07.575Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6840c579182aa0cae2c16b2c

Added to database: 6/4/2025, 10:15:21 PM

Last enriched: 7/7/2025, 2:28:14 AM

Last updated: 8/13/2025, 11:44:30 PM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats