Description
Deno is a JavaScript, TypeScript, and WebAssembly runtime. Prior to 2.7.12, 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. This vulnerability is fixed in 2.7.12.
Published: 2026-06-23
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Prior to Deno 2.7.12, running the runtime in BYONM mode (nodeModulesDir set to "manual") caused the module resolver to bypass validation that a package's entry point remained inside its node_modules/<pkg>/ directory. A malicious package.json whose main field contained .. segments could resolve to an arbitrary path on disk, and the resolver would read that file without consulting the --allow-read allowlist. This allowed a require("evil-pkg") call to return the contents of a file that a direct Deno.readTextFileSync would normally block, effectively granting the Deno process privileged file read access (CWE-22). The vulnerability is fixed in Deno 2.7.12.

Affected Systems

Denoland’s Deno runtime in any version earlier than 2.7.12 when executed in BYONM mode is affected. Versions 2.7.12 and later contain a fix that validates the main entrypoint’s containment within node_modules. The issue only manifests when the nodeModulesDir configuration is set to "manual".

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity. The EPSS score is not available, and the vulnerability is not listed in CISA’s KEV catalog. A typical exploitation scenario requires an attacker to provide a crafted npm package that is imported by a Deno script running in BYONM mode. Once the package is loaded, the resolver reads an arbitrary file without respecting read permissions, allowing the attacker to read any file the process can access. Based on the description, it is inferred that the exploit requires local execution, but if the Deno process runs with elevated privileges, the impact can be more severe.

Generated by OpenCVE AI on June 24, 2026 at 10:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Deno 2.7.12 or later, which enforces main entrypoint validation in BYONM mode
  • Disable BYONM mode by setting nodeModulesDir to "auto" or removing custom node_modules directories
  • Audit installed packages for unsafe package.json main fields containing path traversal segments and remove any such packages

Generated by OpenCVE AI on June 24, 2026 at 10:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-968w-xfqw-vp9q Deno: BYONM module resolution allows `package.json` main path traversal to bypass `--allow-read` restrictions
History

Wed, 24 Jun 2026 16:15:00 +0000

Type Values Removed Values Added
First Time appeared Deno
Deno deno
Vendors & Products Deno
Deno deno

Tue, 23 Jun 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 23 Jun 2026 17:30:00 +0000

Type Values Removed Values Added
Description Deno is a JavaScript, TypeScript, and WebAssembly runtime. Prior to 2.7.12, 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. This vulnerability is fixed in 2.7.12.
Title Deno: BYONM module resolution allows `package.json` main path traversal to bypass `--allow-read` restrictions
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-23T17:50:19.392Z

Reserved: 2026-05-29T19:08:01.257Z

Link: CVE-2026-49406

cve-icon Vulnrichment

Updated: 2026-06-23T17:50:09.415Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-24T16:00:06Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')