{"id":"GHSA-72r4-9c5j-mj57","revision":null,"records":[{"revision":"f1a3e3b10ed1436b90f9e5d3635a047a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-59194","aliases":[],"title":"pnpm: patch-remove could delete project-selected files outside the patches directory","description":"pnpm is a package manager. Prior to 10.34.4 and 11.7.0, a crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This vulnerability is fixed in 10.34.4 and 11.7.0.","state":0,"publishedAt":"2026-07-06T15:16:28.485+00:00","modifiedAt":"2026-07-07T16:57:59.326+00:00","affected":[{"ecosystem":"Vendor product","name":"pnpm","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"pnpm\",\n                    \"product\": \"pnpm\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 10.34.4\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 11.0.0, < 11.7.0\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","score":7.1,"severity":"HIGH"}],"references":["https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-59194","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-59194","identifiers":["CVE-2026-59194"]},"retained":false,"historicalAffected":[]},{"revision":"0e396f7ec6c44d2ab4ac73ffa754af94","observedAt":"2026-11-23T18:30:44.41+00:00","statement":{"source":"euvd","id":"EUVD-2026-41881","aliases":["CVE-2026-59194"],"title":"pnpm is a package manager. Prior to 10.34.4 and 11.7.0, a crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This vulnerability is fixed in 10.34.4 a…","description":"pnpm is a package manager. Prior to 10.34.4 and 11.7.0, a crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This vulnerability is fixed in 10.34.4 and 11.7.0.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","score":7.1,"severity":null}],"references":["https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-41881","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 6, 2026, 3:16:28 PM","dateUpdated":"Jul 7, 2026, 4:57:59 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-41881","identifiers":["EUVD-2026-41881","CVE-2026-59194"]},"retained":false,"historicalAffected":[]},{"revision":"42f1f5a45a304e4d94ca270c7fff9e30","observedAt":"2026-10-25T14:19:22.811+00:00","statement":{"source":"nvd","id":"CVE-2026-59194","aliases":[],"title":"pnpm is a package manager. Prior to 10.34.4 and 11.7.0, a crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This vulnerability is fixed in 10.34.4 a…","description":"pnpm is a package manager. Prior to 10.34.4 and 11.7.0, a crafted patch entry could resolve outside the configured patches directory and cause pnpm patch-remove to delete an arbitrary reachable file. This vulnerability is fixed in 10.34.4 and 11.7.0.","state":0,"publishedAt":"2026-07-06T16:16:37.55+00:00","modifiedAt":"2026-07-07T19:08:57.837+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","score":7.1,"severity":"HIGH"}],"references":["https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-59194","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-22","CWE-73"],"productCriteria":["cpe:2.3:a:pnpm:pnpm:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2026-07-06T16:16:37.550","lastModified":"2026-07-07T19:08:57.837"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-59194","identifiers":["CVE-2026-59194"]},"retained":false,"historicalAffected":[]},{"revision":"6a5ea07717e14771aea60d43624dd0f8","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-72r4-9c5j-mj57","aliases":["CVE-2026-59194"],"title":"pnpm: `patch-remove` could delete project-selected files outside the patches directory","description":"## Summary\n\nThe `patch-remove` deletion-scope issue tracked as GHSA-72r4-9c5j-mj57 / CAND-PNPM-030 has been addressed in pnpm.\n\nA crafted patch entry could resolve outside the configured patches directory and cause `pnpm patch-remove` to delete an arbitrary reachable file. This patch validates the configured directory and every resolved target before unlinking anything, then deletes the final directory entry without following it.\n\n## Security boundary\n\n- Traversal and absolute paths that resolve outside the configured patches directory are rejected before deletion.\n- Parent directories are canonicalized before deletion, including the case where a nested symlink points outside and the final outside entry is itself dangling.\n- The complete batch is validated before any file is removed.\n- Component-aware predicates accept valid names beginning with `..` while still rejecting parent traversal, Windows drive escapes, and UNC escapes.\n- Valid files and symlinked patch directories whose canonical targets remain below the lockfile directory continue to work.\n- A final symlink inside a valid patch directory is unlinked without following its target, including when the target is outside or dangling.\n\n## Exploit replay\n\nBefore the patch, a workspace `patchedDependencies` path that resolved outside the project caused `pnpm patch-remove` to delete the external sentinel. A second replay used a nested parent symlink and a dangling outside victim: `realpath()` returned `ENOENT`, yet the victim was still removed. With this patch, both paths are rejected and the outside entries remain intact.\n\n## Files changed\n\n- `patching/commands/src/isSubdirectory.ts` performs component-aware containment checks.\n- `patching/commands/src/patchRemove.ts` validates the full batch, canonicalizes parents, and unlinks final entries without following them.\n- `patching/commands/test/{isSubdirectory,patchRemove}.test.ts` covers traversal, nested symlinks, dangling victims, and valid removals.\n\n## Commands run\n\n```text\n$ pnpm --filter @pnpm/patching.commands test test/isSubdirectory.test.ts test/patchRemove.test.ts\nPASS: 11 tests across 2 suites\n$ pnpm --filter @pnpm/patching.commands run compile\nPASS\n$ git diff --check\nPASS\n```\n\n## Validation\n\n- Focused handler and path-predicate suites: 11 passed across 2 suites.\n- Package-wide ESLint: passed.\n- Package TypeScript build: passed.\n- Commit hooks, Commitlint, and `git diff --check`: passed.\n- The broader integration harness was environment-blocked because it writes outside the available temporary root; focused handler tests used `/private/tmp`.\n\n## Patches\n\n`10.34.4`: https://github.com/pnpm/pnpm/commit/352ae489f1b14ffdc19d2c6eacb1b06b098c2ddc\n`11.7.0`: https://github.com/pnpm/pnpm/commit/612a2e6a7333f2b061f452a21b6e62c1c161747f\n\n## Compatibility\n\nMissing patch files remain no-ops. Valid symlinked patch directories continue to work when their canonical target stays inside the lockfile directory, and final symlinks are removed without touching their targets. `patch-remove` is not yet in pacquet's command surface, so no Rust-side parity change is required.\n\n## Remaining risk\n\nPortable Node APIs do not expose directory-fd-relative `unlinkat()`. A local attacker who can replace an already validated parent directory before the unlink may still win a time-of-check/time-of-use race. The reproduced repository-controlled traversal and symlink paths do not require that concurrent capability and are blocked by this patch.\n\n---\nWritten by an agent (Codex, GPT-5).","state":0,"publishedAt":"2026-06-27T00:12:39+00:00","modifiedAt":"2026-07-08T08:27:15.6647675+00:00","affected":[{"ecosystem":"npm","name":"pnpm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"10.34.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"pnpm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"11.0.0"},{"kind":"fixed","version":"11.7.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/pnpm/pnpm/security/advisories/GHSA-72r4-9c5j-mj57","https://github.com/pnpm/pnpm/commit/612a2e6a7333f2b061f452a21b6e62c1c161747f","https://github.com/pnpm/pnpm","http://github.com/pnpm/pnpm/commit/352ae489f1b14ffdc19d2c6eacb1b06b098c2ddc"],"sourceUrl":"https://github.com/advisories/GHSA-72r4-9c5j-mj57","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-72r4-9c5j-mj57","identifiers":["GHSA-72r4-9c5j-mj57","CVE-2026-59194"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-25T10:47:30.2236653+00:00","complete":true,"records":1795,"lastAttemptAt":"2026-11-25T10:47:30.2236653+00:00","lastSuccessAt":"2026-11-25T10:47:30.4731581+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:30.4731593+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-8d356adab43082cb10bb7c033ed58312cf2ad2f0fb10e0afdf27fc89fa361f3b-eb33a37fae804496f103cb3c711c068eaf73ae5b7f2fc145db563dd9569d6d54","complete":true,"records":432073,"lastAttemptAt":"2026-11-25T10:44:59.7922852+00:00","lastSuccessAt":"2026-11-25T10:44:59.623386+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:44:59.7922852+00:00","snapshotPublishedAt":"2026-11-25T10:30:26+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-64340dec61194e008a5f85a646ed6b46","complete":false,"records":13938,"lastAttemptAt":"2026-11-25T10:56:47.6350503+00:00","lastSuccessAt":"2026-11-25T10:56:47.63+00:00","error":"137 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-25T10:56:47.63+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13830,"expectedIdentifiers":13986,"failedIdentifiers":137},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-25T10:47:30.2236653+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-25T10:47:30.2236653+00:00","lastSuccessAt":"2026-11-25T10:47:30.4912384+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:30.4912398+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-23f474d106184d03ba6ae4f1b9844075","complete":true,"records":13950,"lastAttemptAt":"2026-11-25T10:47:32.1172209+00:00","lastSuccessAt":"2026-11-25T10:47:32.113+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:32.113+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13986,"expectedIdentifiers":13986,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-e743412268199d418c20ac5ea5d5eefbef4a1c78fcbacada525fcf2201b41d4a","complete":true,"records":10077,"lastAttemptAt":"2026-11-25T10:47:30.0581538+00:00","lastSuccessAt":"2026-11-24T23:11:09.9983084+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:30.0581538+00:00","snapshotPublishedAt":"2026-11-24T22:48:13+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-25T10:45:01.0073572+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:45:01.0073572+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-40938cbac3e2265a24e0d129a60138a855ec8a44cbd619ad6c0de0b22c0e253f","complete":true,"records":3221,"lastAttemptAt":"2026-11-25T10:47:30.1652942+00:00","lastSuccessAt":"2026-11-24T22:27:06.1844325+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:30.1652942+00:00","snapshotPublishedAt":"2026-11-24T22:03:27+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-6e5d85045a345af6d44ad78142d454d21ba8c2b270e694c2418444b295e2f9e6","complete":true,"records":233124,"lastAttemptAt":"2026-11-25T10:47:29.9128061+00:00","lastSuccessAt":"2026-11-25T10:47:28.4616168+00:00","error":null,"lastVerifiedAt":"2026-11-25T10:47:29.9128061+00:00","snapshotPublishedAt":"2026-11-25T10:33:22+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}