A path traversal vulnerability exists in pnpm versions prior to 10.34.5 and from 11.0.0 up to but not including 11.11.0. This flaw allows attacker-controlled package names in the pnpm-lock.yaml file to write files outside the intended node_modules directory during installation. Exploitation can lead to arbitrary code execution if lifecycle scripts are enabled. The vulnerability is fixed in versions 10.34.5 and 11.11.0.
A vulnerability in pnpm before versions 10.34.5 and 11.11.0 allows a tarball dependency's manifest name to escape the node_modules directory via path traversal during installation. This can lead to arbitrary file write or overwrite on the filesystem, potentially replacing critical files such as shell startup scripts, Git hooks, or installed package code, which may result in code execution. The issue is due to improper rejection of slash characters in scoped package names. The vulnerability is fixed in pnpm versions 10.34.5 and 11.11.0.
pnpm versions 11.0.0 before 11.11.0 and 10.7.0 before 10.34.5 contain a vulnerability where environment-variable placeholders in proxy settings within pnpm-workspace.yaml are expanded improperly. This allows an attacker controlling the repository manifest to exfiltrate environment secrets such as NPM_TOKEN or GITHUB_TOKEN by causing them to be included in proxy hostnames or userinfo, routing traffic through attacker-controlled hosts. The issue occurs during configuration loading before any lifecycle scripts run. The vulnerability is fixed in pnpm 11.11.0 and 10.34.5.
A vulnerability in pnpm prior to versions 10.34.2 and 11.5.3 allows a repository to declare configDependencies that cause pnpm to execute a platform-specific pacquet binary controlled by the repository. This can lead to arbitrary code execution during package installation. The issue is fixed in versions 10.34.2 and 11.5.3.
A vulnerability in pnpm versions 4.0.2 up to but not including 10.0.0 involves the use of an MD5-based path shortening function that can cause collisions. These collisions lead to different libraries being stored at the same path, potentially causing indirect overwriting of package data. This issue has been fixed in pnpm version 10.0.0.
pnpm versions prior to 9.15.0 contain a vulnerability where the use of overrides combined with global cache handling allows one workspace to poison the global cache and execute scripts in another workspace, even when 'ignore-scripts' is enabled. This undermines the expected prevention of script execution during package installs. The issue is fixed in version 9.15.0. A recommended workaround is to use separate cache and store directories for each workspace.
pnpm versions 6.25.0 through 10.26.2 are affected by a command injection vulnerability via environment variable substitution in .npmrc configuration files with tokenHelper settings. This flaw allows an attacker with control over environment variables during pnpm operations to execute remote code in build environments. The vulnerability is fixed in version 10.27.0.
pnpm versions 10.26.0 and earlier have a vulnerability where HTTP and git-hosted tarball dependencies in the lockfile lack integrity hashes. This flaw allows a remote server to serve different code on each install, bypassing lockfile protections. An attacker can publish a package with such dependencies and serve varying code to different users or CI/CD environments. The issue is fixed starting from version 10.26.0.
pnpm versions 10.0.0 through 10.25 contain a vulnerability that allows git-hosted dependencies to execute arbitrary code during installation by bypassing the default disablement of dependency lifecycle scripts. This occurs because git dependencies can run prepare, prepublish, and prepack scripts during the fetch phase. The issue is fixed in pnpm version 10.26.0.
A path traversal vulnerability exists in pnpm's binary fetcher prior to version 10.28.1. This flaw allows crafted ZIP packages to write files outside the intended extraction directory by using '../' sequences or absolute paths in ZIP entries, or by manipulating the BinaryResolution.prefix field. Exploitation can lead to overwriting sensitive files and potentially remote code execution. The issue is fixed in pnpm version 10.28.1.
pnpm versions prior to 10.28.1 contain a Windows-specific path traversal vulnerability in tarball extraction. The vulnerability allows malicious packages to write files outside the intended directory on Windows systems by bypassing path normalization checks. This can lead to overwriting critical files such as .npmrc or build configuration files, affecting Windows users and CI/CD pipelines using Windows runners. The issue is patched in version 10.28.1.
A path traversal vulnerability in pnpm before version 10.28.1 allows malicious npm packages to create executable files outside the intended node_modules/.bin directory. This happens because bin names starting with '@' bypass validation, leaving path traversal sequences intact after scope normalization. The vulnerability can be exploited to overwrite configuration files, scripts, or other sensitive files. The issue is fixed in pnpm version 10.28.1.
pnpm versions prior to 10.28.2 contain a symlink traversal vulnerability affecting file: and git: dependencies. This flaw allows malicious packages to follow symlinks beyond the package root during installation, potentially copying sensitive local files such as /etc/passwd or SSH private keys into node_modules. Registry packages are not impacted. The vulnerability is patched in version 10.28.2.
pnpm versions prior to 10.28.2 contain a path traversal vulnerability in the handling of the directories.bin field of packages. This vulnerability allows a malicious package to specify a path outside the package root, causing pnpm to change file permissions (chmod 755) on arbitrary files on Unix-like systems. Windows systems are not affected. The issue is fixed in version 10.28.2.
pnpm versions prior to 10.33.4 and 11.0.7 do not store the tarball hash of GitHub git dependencies in the lockfile. This allows a malicious codeload.github.com server to serve arbitrary tarballs that pnpm will install, bypassing lockfile integrity verification. The vulnerability is fixed in versions 10.33.4 and 11.0.7.
pnpm versions prior to 10.34.0 and 11.4.0 have a vulnerability where the git resolution.commit value from a lockfile is not properly validated before being passed to git fetch. This can allow injection of git options such as --upload-pack, potentially leading to arbitrary command execution when using SSH or local git transports. The issue is fixed in versions 10.34.0 and 11.4.0.
pnpm versions prior to 10.34.0 and 11.4.0 have a vulnerability in their patch application process that allows attackers to write or delete arbitrary files via malicious patch files containing path traversal sequences. This flaw arises because the patch application does not validate file paths extracted from .patch files, enabling directory traversal outside the intended package directory during installation. The issue is fixed in versions 10.34.0 and 11.4.0.
pnpm versions prior to 10.34.0 and 11.4.0 have a vulnerability where a transitive dependency alias can include path traversal segments. This flaw allows an attacker to cause pnpm to replace paths in the current project with symlinks to attacker-controlled directories during installation, even if scripts are ignored. The issue is fixed in versions 10.34.0 and 11.4.0.
pnpm versions prior to 10.34.0 and 11.4.0 can unintentionally send user-level unscoped npm authentication tokens to a registry specified only by a repository-local .npmrc file. This occurs when the user's npm config has a default registry and an unscoped _authToken, but the repository sets a different registry URL without its own token. As a result, the user's token is bound to the repository's registry and sent as an Authorization header during package operations, potentially exposing credentials to unintended registries. The issue is fixed in pnpm versions 10.34.0 and 11.4.0.
A vulnerability in pnpm before versions 10.34.0 and 11.4.0 allows bypassing integrity checks during package installation if the integrity field is missing from the lockfile. This can lead to installation of altered packages without detection when using the --frozen-lockfile option. The issue is specific to pnpm and differs from npm's default integrity enforcement. The vulnerability is fixed in versions 10.34.0 and 11.4.0.