"There's just no way to prevent this" says only programming language where this regularly happens
be me, "senior full-stack engineer" (now 10 months experience)
Framework 5.0 dropped
npm install framework@latest
12,000 packages
all I wanted was a button
one of those packages hasn't been touched in years
maintainer has long since moved on, probably lives on a farm now
nobody's watching it
except the guy who just hijacked it
On November 3, attackers published runtime loaders in 12 releases across
10 hijacked npm packages, some of which had gone years without an update.
mfw one of them is in my tree
mfw I don't know which one
mfw I don't know what's in my tree
the malware needs its next stage
where does it fetch it from?
a normal server? a paste site?
no
It uses Ethereum to fetch the next stage.
my button now has a blockchain dependency
I did not choose this
I chose "latest"
meanwhile the rest of the registry is also on fire
ChainDrop, a variant of the Shai-Hulud worm, infected over 400 packages with over 2 billion downloads.
Attackers used stolen developer credentials to publish the malicious versions.
the worm steals the credentials of whoever installs it
then uses them to infect more packages
my laptop is now a recruiter for the worm
check my .env file
AWS keys
Stripe keys
my ex's Netflix password
a note that says "TODO: rotate these"
dated 2023
Slack lights up
"hey, is anyone else seeing weird outbound traffic?"
"yeah, from your machine"
"mine??"
"you've been shipping 4GB to a wallet address since breakfast"
security team schedules an "urgent sync"
I join late
I'm still waiting for npm audit to finish
npm audit: 1,847 vulnerabilities (212 critical)
npm audit fix --force
it upgrades to Framework 6.0
new vulnerabilities
CTO asks "who approved this dependency?"
I say "the registry did"
he says "the registry doesn't have a login"
I say "exactly, no accountability"
he is not laughing
he is typing in all caps
rotate every secret by hand
rebuild every machine
pin every version for the first time in my life
lockfile finally committed
take a screenshot, post it on LinkedIn: "Excited to share what I learned this week 🚀"
2,000 likes
all from other devs who also don't know what's in their node_modules
tfw Framework 7.0 comes out tomorrow
tfw I know I'll install it