{"vulnerability": "ghsa-72r4-9c5j-mj57", "sightings": [{"uuid": "3563d50d-7e8b-4ac5-97ed-fc057df33108", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "9f56dd64-161d-43a6-b9c3-555944290a09", "vulnerability": "GHSA-72R4-9C5J-MJ57", "type": "seen", "source": "https://gist.github.com/alon710/8e13d6d37310b61ef33c4ee0f35eeb61", "content": "# GHSA-72R4-9C5J-MJ57: GHSA-72R4-9C5J-MJ57: Arbitrary File Deletion via Path Traversal in pnpm patch-remove\n\n&gt; **CVSS Score:** 7.1\n&gt; **Published:** 2026-06-27\n&gt; **Full Report:** https://cvereports.com/reports/GHSA-72R4-9C5J-MJ57\n\n## Summary\nA path traversal vulnerability in the pnpm package manager's 'patch-remove' command allows an attacker to delete arbitrary files outside the patches directory. By manipulating configuration files like package.json, an attacker can specify a traversal path that the application deletes recursively without validating the path's containment.\n\n## TL;DR\nThe pnpm package manager failed to validate file paths in its 'patch-remove' routine. A malicious actor could exploit this by embedding directory traversal sequences in the project's configuration, leading to arbitrary file deletion when a user or CI/CD runner executed the command.\n\n## Exploit Status: POC\n\n## Technical Details\n\n- **CWE ID**: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)\n- **Attack Vector**: Local / Context-dependent execution of malicious workspace files\n- **CVSS Severity**: 7.1 (High Severity Recommendation)\n- **Exploit Status**: Concept-proven (PoC verified in test cases)\n- **Impact Type**: Arbitrary File and Folder Deletion\n- **KEV Status**: Not Listed\n\n## Affected Systems\n\n- pnpm command-line interface\n- @pnpm/plugin-commands-patching node module\n- @pnpm/patching.commands node module\n- **pnpm**: &lt; 10.0.0 (and versions without the containment patch) (Fixed in: `v10.x (patched releases)`)\n- **@pnpm/plugin-commands-patching**: &lt; 10.0.0\n\n## Mitigation\n\n- Upgrade the pnpm installation to a patched version\n- Implement workspace configuration auditing in pull requests\n- Containerize CI/CD pipeline executions to limit host access\n- Restrict workspace filesystem write permissions\n\n**Remediation Steps:**\n1. Identify the current pnpm version in use by running 'pnpm --version'\n2. Update pnpm to a patched version using 'npm install -g pnpm' or the system package manager\n3. Verify that the updated installation handles patch-remove safely by running a test validation\n4. Configure automated repository checks to block unauthorized changes to 'patchedDependencies'\n\n## References\n\n- [GitHub Security Advisory GHSA-72R4-9C5J-MJ57](https://github.com/advisories/GHSA-72R4-9C5J-MJ57)\n\n\n---\n*Generated by [CVEReports](https://cvereports.com/reports/GHSA-72R4-9C5J-MJ57) - Automated Vulnerability Intelligence*", "creation_timestamp": "2026-06-27T01:42:35.368520Z"}]}