Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker plants malicious npm package with path-traversal main field
-
DeliveryVictim installs package into BYONM node_modules tree
-
ExploitVictim Deno app calls require('evil-pkg')
-
ExecutionBYONM resolver joins traversal path, omits --allow-read check
-
PersistTarget JSON file parsed and returned to malicious package code
-
ImpactSensitive file contents exfiltrated beyond --allow-read scope
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions to be true simultaneously: the target Deno application must be configured with BYONM mode enabled via |
| Impact | The vendor-assigned CVSS 3.1 score of 5.5 (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) accurately reflects the attack surface: local vector, low complexity once prerequisites are met, low privilege (local user or supply-chain actor with node_modules write access), confidentiality-only impact. No EPSS score was available in the provided data, so exploitation probability cannot be quantified numerically. This CVE is not in the CISA KEV catalog, meaning no confirmed active exploitation has been documented. However, a self-contained proof-of-concept was confirmed by the reporter and is detailed in the GHSA advisory, which elevates this above theoretical. The most significant risk signal is semantic: Deno's core value proposition is its permission sandbox, and this bypass directly undermines the |
| Exploit ScenarioDerived | An attacker publishes or compromises an npm package containing a |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
BYONM module resolution in Deno (≤ 2.7.11) allows path traversal via crafted package.json main fields, bypassing the --allow-read permission sandbox that is central to Deno's security model. A malicious npm package installed under a BYONM node_modules tree can cause require() to read and return the parsed contents of arbitrary JSON files outside the directory scope granted by --allow-read, while a direct Deno.readTextFileSync() call to the same path would be correctly blocked. No active exploitation is confirmed (not in CISA KEV), but a self-contained proof-of-concept was supplied by the reporter and is documented in the GitHub Security Advisory; real-world risk is meaningful in supply-chain scenarios where Deno's permission model is the primary isolation boundary.
RemediationAI
Upgrade to Deno 2.7.12 or later, which patches the BYONM module resolver to constrain resolved entrypoint paths to the package directory and reject .. traversal; this is the vendor-confirmed fix per GHSA-968w-xfqw-vp9q at https://github.com/denoland/deno/security/advisories/GHSA-968w-xfqw-vp9q. For users who cannot immediately upgrade, three workarounds are available with distinct trade-offs: first, disable BYONM mode by removing nodeModulesDir: "manual" from deno.json and switching to Deno's default managed npm resolution, which uses a separate code path that correctly rejects path traversal - this is the most effective workaround but may require restructuring dependency management and is incompatible with projects that depend on BYONM's user-managed tree; second, manually audit all package.json files within node_modules for .. segments in the main field before executing the application, which is operationally burdensome, error-prone at scale, and must be re-performed after any dependency change; third, grant --allow-read without scope restriction only when every file the OS user can access is already acceptable to expose, which eliminates the bypass boundary entirely but surrenders the filesystem isolation that Deno's permission model is designed to provide.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in cargo
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Deno is a Rust-based JavaScript and TypeScript runtime (CPE: pkg:rust/deno) that implements a fine-grained permission system, including --allow-read to restrict filesystem reads to scoped directories. BYONM mode (nodeModulesDir: "manual" in deno.json) is an opt-in configuration allowing Deno to resolve npm packages from a user-managed node_modules directory rather than Deno's default managed resolution. Under this path, the resolver reads each package's package.json, extracts the main field, and joins it to the package directory to locate the entrypoint. The root cause is CWE-22 (Path Traversal): the BYONM permission checker only verified the presence of a node_modules component in the path string and did not reject or canonicalize .. segments, so a main value of ../../../secret.json escaped the package root entirely. Because JSON entrypoints are parsed and their contents returned through require(), the traversal specifically exposed .json file contents to requiring code - a distinct exposure path from the filesystem APIs, which correctly enforced the allowlist. Non-JSON entrypoints (.js, .cjs, .mjs) caused code execution within the granted permission set rather than this data-exfiltration vector.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
AV:L because the attacker must write to local node_modules; PR:L for local user or supply-chain actor; C:H for arbitrary JSON file exposure; I:N and A:N as no write or availability impact exists.
Primary rating from Vendor (https://github.com/denoland/deno).
CVSS VectorVendor: https://github.com/denoland/deno
DescriptionCVE.org
Summary
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.
Details
In BYONM mode, Deno resolved npm packages directly from a user-managed node_modules tree. Resolution of require("pkg") proceeded by reading pkg/package.json, taking the main field, joining it to the package directory, and loading the result as a module.
The path joined from main was not constrained to the package root. A package.json such as:
{ "main": "../../../secret.json" }resolved to node_modules/pkg/../../../secret.json, escaping node_modules entirely. The BYONM permission check accepted any path that contained a node_modules component and did not reject .. traversal, so the resolved path was loaded without a read-permission check.
Because resolution loaded JSON entrypoints by parsing their contents and returning them through require, this exposed the contents of arbitrary .json files reachable by the OS user to the requiring code, even when --allow-read had been narrowed to a specific directory.
The same file accessed via Deno.readTextFileSync was correctly blocked. The bug was that module resolution did not enforce the same read-permission boundary that the filesystem APIs enforced.
Proof of concept
The reporter supplied a self-contained PoC. Layout:
/tmp/deno_byonm_poc/
├── app/
│ ├── deno.json (BYONM enabled)
│ ├── exploit.ts (require("evil-pkg"))
│ └── node_modules/
│ └── evil-pkg/
│ └── package.json (main: "../../../secret.json")
└── secret.json (outside --allow-read scope)Run:
deno run --no-prompt --allow-read=/tmp/deno_byonm_poc/app exploit.tsObserved:
Deno.readTextFileSync("/tmp/deno_byonm_poc/secret.json")- blocked, as
expected.
require("evil-pkg")- returned the parsed contents ofsecret.json,
bypassing the read allowlist.
A control run with BYONM disabled (--no-config) blocked the require call.
Impact
The vulnerability allowed a hostile npm package installed under a BYONM node_modules to read JSON files outside the directories granted via --allow-read, up to the privileges of the OS user running Deno. In practice this exposed configuration and credential files (.env.json, cloud credentials, package lockfiles, etc.) that the user had deliberately excluded from the read scope.
The vulnerability did not grant any capability beyond what the OS user already held, did not affect runs that granted unrestricted --allow-read, and required the user to have installed and then required a hostile package, i.e. an existing supply-chain compromise. The reason it warranted a security advisory rather than a routine bug fix is that Deno's permission model promised that --allow-read=<scope> was a hard boundary *even over untrusted npm code*, and that promise was broken.
Not affected:
- Runs without BYONM (default npm resolution went through a separate code
path that rejected the traversal).
- Runs with full
--allow-read(no boundary to bypass). - Non-JSON entrypoints, in practice -
.js/.cjs/.mjstargets executed
rather than exposing file contents, which already implied attacker code execution within the granted permission set.
Workarounds
Users on unpatched versions could mitigate by:
- Avoiding BYONM mode (
nodeModulesDir: "manual") for projects that depended
on untrusted packages.
- Auditing
package.jsonmainfields innode_modulesfor..segments
before running.
- Granting
--allow-readonly when the read scope already covered every file
the OS user could see (in which case there was no boundary to bypass and no additional exposure).
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-38545
GHSA-968w-xfqw-vp9q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB