CVE-2024-53866

pnom vulnerable to no-script global cache poisoning via overrides / `ignore-scripts` evasion

Description

The package manager pnpm prior to version 9.15.0 seems to mishandle overrides and global cache: Overrides from one workspace leak into npm metadata saved in global cache; npm metadata from global cache affects other workspaces; and 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. Global state integrity is lost via operations that one would expect to be secure, enabling subsequently running arbitrary code execution on installs. Version 9.15.0 fixes the issue. As a work-around, use separate cache and store dirs in each workspace.

Category

5.8
CVSS
Severity: Medium
CVSS 4.0 •
EPSS 0.03%
Affected: pnpm pnpm
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-53866?
CVE-2024-53866 has been scored as a medium severity vulnerability.
How to fix CVE-2024-53866?
To fix CVE-2024-53866, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-53866 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-53866 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-53866?
CVE-2024-53866 affects pnpm pnpm.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.