Impact
pnpm, a JavaScript package manager, incorrectly parses the package name from entries in pnpm-lock.yaml when constructing the dependency graph. Because the parsed name is used directly in a path join operation without validation, an attacker can supply a crafted depPath that contains path-traversal sequences. When pnpm install is run, the malicious package name allows files to be written outside the expected node_modules directory. If the environment permits lifecycle scripts (via dangerousAllowAllBuilds or an explicit allowBuilds entry), the attacker’s payload can execute code with the permissions of the user running pnpm. Consequently, this flaw enables local code execution or privilege escalation on systems that run pnpm with untrusted lockfiles. pnpm packages in the range prior to version 10.34.5 and the 11.x series up through 11.11.0 are affected. Users of pnpm 10.0-10.34.4 and pnpm 11.0-11.11.0 must review their installed versions and consider upgrading. No other pnpm major releases are listed as vulnerable. The CVSS score of 7.1 indicates a high impact, and the lack of an EPSS rating implies no measured current exploit prevalence but does not preclude exploitation. This vulnerability is not present in the CISA KEV catalog, suggesting that known exploits are not publicly documented. Given that the flaw requires only a malicious pnpm-lock.yaml file and runs at install time, the likely attack vector is local, though a compromised package source could supply the lockfile. If an attacker can persuade a developer to install a dependency using the malicious lockfile, they could gain arbitrary command execution on the developer’s system.
Affected Systems
pnpm is distributed under the pnpm:pnpm name and is affected in all releases prior to version 10.34.5 and in the 11.x sequence up through 11.11.0. All users of pnpm 10.x before 10.34.5 and all users of pnpm 11.x before 11.11.0 should verify their installed version and plan an upgrade. No other pnpm major releases have been identified as vulnerable in the current advisory.
Risk and Exploitability
The issue carries a CVSS score of 7.1, classifying it as a high‑severity vulnerability. EPSS information is unavailable, and the vulnerability is not listed in the CISA KEV catalog, meaning there are no known publicly documented exploits at the time of this analysis. Exploitation requires a malicious pnpm-lock.yaml file that contains a crafted depPath with path‑traversal sequences. During a standard pnpm install, this path traversal allows an attacker to write files outside the intended node_modules directory. If lifecycle scripts are permitted, the payload can execute with the user's privileges, enabling local code execution or privilege escalation. The attack vector is local— it necessitates that the attacker supplies or influences the lockfile that is processed by pnpm. However, supply chain attacks could introduce the malicious lockfile into a trusted project, making the threat less obvious. Thus, the vulnerability poses a significant risk to any environment that installs packages from untrusted sources.
OpenCVE Enrichment