Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. deno
  4. ›
  5. CVE-2026-49406

CVE-2026-49406: Deno: BYONM module resolution allows `package.json` main path traversal to bypass `--allow-read` restrictions

June 16, 2026

When Deno was run in BYONM mode (nodeModulesDir: "manual"), the module resolver did not validate that a package’s resolved entrypoint stayed within its node_modules/<pkg>/ directory. A malicious package.json whose main field contained .. segments was able to resolve to an arbitrary path on disk, and the resolver then read that file without consulting the --allow-read allowlist. This let a require("evil-pkg") call return the contents of a file that a direct Deno.readTextFileSync(...) call would have been blocked from reading.

References

  • github.com/advisories/GHSA-968w-xfqw-vp9q
  • github.com/denoland/deno/security/advisories/GHSA-968w-xfqw-vp9q
  • nvd.nist.gov/vuln/detail/CVE-2026-49406

Code Behaviors & Features

Detect and mitigate CVE-2026-49406 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.7.12

Fixed versions

  • 2.7.12

Solution

Upgrade to version 2.7.12 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

cargo/deno/CVE-2026-49406.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:49 +0000.