{"id":"CVE-2026-49406","published":"2026-06-23T17:19:15Z","modified":"2026-06-23T17:50:19Z","title":"Deno: BYONM module resolution allows `package.json` main path traversal to bypass `--allow-read` restrictions","vendor":"denoland","product":"deno","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00176,"percentile":0.07257,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-968w-xfqw-vp9q","tags":["x_refsource_CONFIRM"]}],"priority":{"score":5.3,"factors":[{"name":"EPSS percentile","points":1.45},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"denoland","affectedVersions":[{"vendor":"denoland","product":"deno","versions":["< 2.7.12"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-23T17:49:51.311695Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"deno","vulnerableRanges":["<2.7.12"],"patched":["2.7.12"],"from":["GHSA-968w-xfqw-vp9q"],"provenance":"source"}],"summary":{"text":"Deno's module resolver, when running in BYONM mode (nodeModulesDir: \"manual\"), fails to confirm that a package's resolved entrypoint stays inside its own node_modules/<pkg>/ directory, so a package.json main field containing \"..\" segments can point to arbitrary files on disk. An attacker who can get a malicious package into the project's dependencies, with local access and low privileges, can use a require() of that package to read files that would otherwise be blocked by the --allow-read allowlist, with no user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:19:49Z"},"euvd":{"id":"EUVD-2026-38545","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-55517","published":"2026-06-23","fixed":"2.7.5","kev":false},{"cve":"CVE-2026-44726","published":"2026-06-23","fixed":"2.7.8","kev":false},{"cve":"CVE-2026-49402","published":"2026-06-23","fixed":"2.7.10","kev":false,"link":{"from":"CVE-2026-49402","to":"CVE-2026-49406","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:deno","fromFixed":"2.7.10","toFixed":"2.7.12","daysApart":0}]}},{"cve":"CVE-2026-49406","published":"2026-06-23","fixed":"2.7.12","kev":false},{"cve":"CVE-2026-49401","published":"2026-06-23","fixed":"2.7.14","kev":false,"link":{"from":"CVE-2026-49406","to":"CVE-2026-49401","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:deno","fromFixed":"2.7.12","toFixed":"2.7.14","daysApart":0}]}},{"cve":"CVE-2026-49411","published":"2026-06-23","fixed":"2.8.0","kev":false},{"cve":"CVE-2026-49440","published":"2026-06-23","fixed":"2.8.1","kev":false}],"package":"crates.io:deno"}}