CVE-2024-53866CWE-426

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

Medium · published December 10, 2024

CVSS v4.0
5.8
EPSS
1%
Percentile
61.8
In the wild
Unconfirmed
What it is

⚠️ A workspace’s mistake can spill over into every project! pnpm versions before 9.15.0 mishandle overrides and global cache, causing a chain reaction that could install unwanted scripts. 🔥 Think of it like a shared kitchen where one person spills a toxic ingredient into the pantry. Instead of keeping their mess contained, it seeps into everything else, potentially ruining meals for everyone else. If a malicious script finds its way into your project through this cache leak, it could execute in another workspace without your knowledge. This breach of trust in what you expect to be a safe environment is a serious breach that could lead to arbitrary code execution during installations. Yikes!

Put simply

Think of it like a shared kitchen where one person spills a toxic ingredient into the pantry. Instead of keeping their mess contained, it seeps into everything else, potentially ruining meals for everyone else. This vulnerability in pnpm allows overrides from one workspace to affect npm metadata stored in a global cache, resulting in unintended script execution across different workspaces. Essentially, operations believed to be secure are compromised, leading to a loss of integrity.

What to do

If a malicious script finds its way into your project through this cache leak, it could execute in another workspace without your knowledge. This breach of trust in what you expect to be a safe environment is a serious breach that could lead to arbitrary code execution during installations. Yikes! Upgrade pnpm to version 9.15.0 immediately to resolve this issue. As a workaround, consider using separate cache and store directories for each workspace to avoid conflicts. Double-check your environment to ensure no unwanted scripts are running. You've got this! With these steps, you can lock down your workspaces and continue coding with confidence! 🛡️

The record
Technical detail
CVSS v4.0
5.8 · MEDIUM
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:H/SI:H/SA:H
EPSS
0.00977 · 61.8th percentile
Weakness
CWE-426 · Untrusted Search Path
Published
2024-12-10T17:12Z
EPSS history
Timeline
  • 10 DEC 17:12Z
    pnpm vulnerable to no-script global cache poisoning via overrides / `ignore-scripts` evasion
    cvelistv5