CVE-2021-32619
JSON

9.8critical

Static imports inside dynamically imported modules do not adhere to permission checks

Severity
9.8critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.11% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-xpwj-7v8q-mcgj

Description

Deno is a runtime for JavaScript and TypeScript that uses V8 and is built in Rust. In Deno versions 1.5.0 to 1.10.1, 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. The vulnerability has been patched in Deno release 1.10.2.

Affected

Product or packageVersionsReported by
denoland deno< 1.10.2CVE List
deno (crates.io)from 1.5.0 before 1.10.2GitHub Advisory Database
deno denofrom 1.5.0 before 1.10.2NVD

All scores

GitHub_M9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

Deno is a runtime for JavaScript and TypeScript that uses V8 and is built in Rust. In Deno versions 1.5.0 to 1.10.1, 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. The vulnerability has been patched in Deno release 1.10.2.

GitHub Advisory Database
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 (January 19th, 2021) this vulnerability was able to be exploited in a fully sandboxed isolate (without any permissions). This vulnerability was not present in releases prior to 1.5.0.

Arbitrary non-GET requests, control over request headers, or file system writes are not possible through this vulnerability. Users of the deno_core, deno_runtime, or other deno_* crates are not affected. This is a Deno CLI only vulnerability.

We are relatively confident this was not abused in the wild, as by default Deno prints out a green "Download" message when remote imports are downloaded, and this would have caused suspicion if it occurred in the middle of a programs execution. This message can be silenced with the --quiet flag.

Patches

The vulnerability has been patched in Deno release 1.10.2. You can upgrade to the latest Deno version by running the deno upgrade command. The release is available through all official download channels.

Workarounds

There is no workaround for this issue.

For more information

If you have any questions or comments about this advisory:

NVD (es)

Deno es un tiempo de ejecución para JavaScript y TypeScript que usa V8 y está construido en Rust.&#xa0;En versiones 1.5.0 hasta 1.10.1 de Deno, los módulos que son importados dinámicamente mediante las funciones "import()" o "new Worker" podrían haber sido capaces de omitir las comprobaciones de permisos de la red y del sistema de archivos al importar de forma estática otros módulos.&#xa0;La vulnerabilidad ha sido parcheada en la versión 1.10.2 de Deno

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32619 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-xpwj-7v8q-mcgj changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32619 changed 2026-06-17Public domain