Skip to content
RCE Write-up Advanced

keyv and cacheable npm Package Hijacked in Supply Chain Attack

Multiple npm packages in the keyv and cacheable ecosystem were published with a malicious payload after a GitHub maintainer account was compromised. The malware harvested cloud credentials, developer secrets, AI tool configuration and cryptocurrency wallets, and spread to over 400 packages.

Merav Bar Follow

Published on wiz.io

Wiz Research is actively investigating an ongoing software supply chain attack affecting multiple npm packages in the Keyv/Cacheable ecosystem. This blog presents our initial findings based on the analysis completed so far.

Merav Bar, on wiz.io

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a compromised GitHub maintainer account allowed the attacker to publish malicious versions of trusted npm packages, whose install-time code then harvested secrets.

Impact

Anyone who installed the affected versions may have had cloud credentials, developer tokens, SSH keys and cryptocurrency wallets stolen, and the payload spread to over 400 packages.

What the attacker needed

A compromised maintainer account; victim installs an affected package version

The fix

Security teams should remove the affected versions, rebuild affected systems, rotate exposed credentials and enable dependency allowlisting and provenance controls.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Software projects often rely on small building blocks downloaded from a public library called npm, and whoever controls one popular block can push a bad version to everyone who uses it. Here an attacker took over a maintainer's account and published poisoned versions of widely used packages. When developers installed them, the code quietly copied passwords, cloud keys and wallet files and sent them out.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Merav Bar

View all

27 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.