Title: Package map subpath resolves outside the target package directory · Issue #65501 · nodejs/node · GitHub
Open Graph Title: Package map subpath resolves outside the target package directory · Issue #65501 · nodejs/node
X Title: Package map subpath resolves outside the target package directory · Issue #65501 · nodejs/node
Description: Version v26.5.0 Platform Subsystem module What steps will reproduce the bug? // package-map.json { "packages": { "app": { "url": "./app", "dependencies": { "dep": "dep" } }, "dep": { "url": "./dep", "dependencies": {} } } } // app/index....
Open Graph Description: Version v26.5.0 Platform Subsystem module What steps will reproduce the bug? // package-map.json { "packages": { "app": { "url": "./app", "dependencies": { "dep": "dep" } }, "dep": { "url": "./dep"...
X Description: Version v26.5.0 Platform Subsystem module What steps will reproduce the bug? // package-map.json { "packages": { "app": { "url": "./app", "dependencies&...
Opengraph URL: https://github.com/nodejs/node/issues/65501
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Package map subpath resolves outside the target package directory","articleBody":"### Version\n\nv26.5.0\n\n### Platform\n\n```text\n\n```\n\n### Subsystem\n\nmodule\n\n### What steps will reproduce the bug?\n\n``` json\n // package-map.json\n {\n \"packages\": {\n \"app\": { \"url\": \"./app\", \"dependencies\": { \"dep\": \"dep\" } },\n \"dep\": { \"url\": \"./dep\", \"dependencies\": {} }\n }\n }\n```\n``` js\n // app/index.js\n require('dep/../../secret.js');\n```\n` node --experimental-package-map ./package-map.json app/index.js`\n\n\n### How often does it reproduce? Is there a required condition?\n\nalways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nResolution should fail with ERR_INVALID_MODULE_SPECIFIER, because the subpath escapes the target package's own directory (dep) as declared in the package map.\n\n\n### What do you see instead?\n\nThe specifier resolves successfully to a file outside the target package directory.\n\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/islandryu","@type":"Person","name":"islandryu"},"datePublished":"2026-08-23T10:39:19Z","url":"https://github.com/nodejs/node/issues/65501"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e238ef51-3431-3a2f-2a0d-f1f87b2890a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C998:3A3994:932970:C0071B:6AED3BD4 |
| html-safe-nonce | 85b8f911bd5ed5ce81fa06c8bd97df696511a850aa64bf6412d6ce9723b27156 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTk4OjNBMzk5NDo5MzI5NzA6QzAwNzFCOjZBRUQzQkQ0IiwidmlzaXRvcl9pZCI6IjM1ODgwNzAzMjkwMDE3Mjc1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 555935e8875fd94c5f8c401f5aee229f9f341992d3740ee64fd040fc76412a14 |
| hovercard-subject-tag | issue:5226486021 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65501/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e84834aa8b65a8de8f1aca3202c35a05ea3c64353ccc399bec3f0b523c1d2165/nodejs/node/issues/65501 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e84834aa8b65a8de8f1aca3202c35a05ea3c64353ccc399bec3f0b523c1d2165/nodejs/node/issues/65501 |
| og:image:alt | Version v26.5.0 Platform Subsystem module What steps will reproduce the bug? // package-map.json { "packages": { "app": { "url": "./app", "dependencies": { "dep": "dep" } }, "dep": { "url": "./dep"... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | islandryu |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c629ad99c254d306375fc8354d04321c2c362236 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width