# CVE-2026-49406: Deno path traversal and permission bypass in BYONM module resolution

Source: https://junglewise.ai/threats/cve-2026-49406-deno-path-traversal-and-permission-bypass-in-byonm-module  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-49406 · Severity: medium · CVSS 5.5 · Published 2026-06-23

Deno is a software runtime used to execute JavaScript and TypeScript applications. A security flaw in how Deno handles certain manual package configurations allows a malicious package to bypass security restrictions and read sensitive files on the host system that it should not have access to. This could lead to the exposure of private data, such as configuration files or credentials, if a developer uses a compromised or untrusted third-party library.

Technologies: [deno (crates.io)](https://junglewise.ai/threats/technologies/deno). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is CVE-2026-49406 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-49406 being exploited in the wild.

**How severe is CVE-2026-49406?** Medium severity, with a CVSS score of 5.5, published 23 June 2026.

**Which products and versions are affected?** deno (crates.io) <= 2.7.11, SEMVER:introduced=0,fixed=2.7.12.

**Is there a fix for CVE-2026-49406?** Yes. deno (crates.io): upgrade to 2.7.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-49406 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-49406?** Check whether you run deno (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- deno (crates.io): upgrade to 2.7.12 or later

  ```sh
  cargo update -p deno
  ```


## Technical details

A path traversal vulnerability exists in Deno's 'Bring Your Own Node Modules' (BYONM) mode, specifically when 'nodeModulesDir' is set to 'manual'. The module resolver fails to validate that a package's entrypoint, defined in the 'main' field of package.json, remains within the package's directory. By using dot-dot (..) sequences, a malicious package can point its entrypoint to sensitive files elsewhere on the disk (e.g., .env files or credentials). Because the BYONM resolver bypasses the standard '--allow-read' permission checks for paths containing 'node_modules', it can read and return the contents of these files to the application. This vulnerability is fixed in version 2.7.12.

## Affected products

- denoland Deno < 2.7.12

## Identifiers

- CVE-2026-49406
- GHSA-968w-xfqw-vp9q

## Timeline

- 2026-05-27: advisory: GitHub advisory published by maintainers
- 2026-06-23: disclosed: NVD publication date
- 2026-06-23: patched: Fix confirmed in version 2.7.12

## References

- [https://github.com/denoland/deno/security/advisories/GHSA-968w-xfqw-vp9q](https://github.com/denoland/deno/security/advisories/GHSA-968w-xfqw-vp9q)

## Related threats

- [Deno denial of service via non-ASCII WebSocket response headers](https://junglewise.ai/threats/cve-2026-55517-deno-denial-of-service-via-non-ascii-websocket-response-headers)
- [Deno environment permission bypass in process.loadEnvFile](https://junglewise.ai/threats/cve-2026-49983-deno-environment-permission-bypass-in-process-loadenvfile)
- [Deno sandbox bypass via missing post-DNS check in WebSocket API](https://junglewise.ai/threats/cve-2026-49860-deno-sandbox-bypass-via-missing-post-dns-check-in-websocket-api)
- [Deno network restriction bypass in fetch API](https://junglewise.ai/threats/cve-2026-49859-deno-network-restriction-bypass-in-fetch-api)
- [Deno missing cryptographic rounds in node:crypto checkPrime](https://junglewise.ai/threats/cve-2026-49440-deno-missing-cryptographic-rounds-in-node-crypto-checkprime)
