Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. pnpm
  4. ›
  5. CVE-2024-53866

CVE-2024-53866: pnpm no-script global cache poisoning via overrides / `ignore-scripts` evasion

December 10, 2024

pnpm seems to mishandle overrides and global cache:

  1. Overrides from one workspace leak into npm metadata saved in global cache
  2. npm metadata from global cache affects other workspaces
  3. installs by default don’t revalidate the data (including on first lockfile generation)

This can make workspace A (even running with ignore-scripts=true) posion global cache and execute scripts in workspace B

Users generally expect ignore-scripts to be sufficient to prevent immediate code execution on install (e.g. when the tree is just repacked/bundled without executing it).

Here, that expectation is broken

References

  • github.com/advisories/GHSA-vm32-9rqf-rh3r
  • github.com/pnpm/pnpm
  • github.com/pnpm/pnpm/commit/11afcddea48f25ed5117a87dc1780a55222b9743
  • github.com/pnpm/pnpm/security/advisories/GHSA-vm32-9rqf-rh3r
  • nvd.nist.gov/vuln/detail/CVE-2024-53866

Code Behaviors & Features

Detect and mitigate CVE-2024-53866 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 9.15.0

Fixed versions

  • 9.15.0

Solution

Upgrade to version 9.15.0 or above.

Weakness

  • CWE-346: Origin Validation Error
  • CWE-426: Untrusted Search Path

Source file

npm/pnpm/CVE-2024-53866.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:44 +0000.