1. Default execution of arbitrary code
npm runs post‑install scripts automatically, letting any published package execute code as the installing user.
"npm allows all packages to run package supplied arbitrary code as the logged‑in user after an update completes." – Someone1234
2. Scale and frequency of attacks
The size and fragmentation of the npm registry make it the most‑targeted ecosystem, with new malicious packages appearing daily.
"npm is where it keeps happening over and over and over and over and over and over again." – paulfcr
3. Mitigations: cooldowns & minimum release age
Delaying updates gives security scanners time to spot malicious releases; tools like pnpm enforce a default cooldown.
"pnpm added 1 day cooldown by default since v11." – mihaelm
"The one‑week cooldown ... gives automated scanners a chance to notice." – blm126
4. Comparison with other managers
Most package managers execute scripts, but they rely on signed, curated packages; npm’s automatic, unsigned path is unique.
"apt/dnf scripts run on packages a maintainer signed and a distro gatekept. Not on whatever some rando pushed..." – ImPostingOnHN
5. Cultural/behavioral root causes Developers default to “latest” versions and tiny dependencies, skipping vetting and dramatically increasing the attack surface.
"The culture of many tiny modules ... means many more points‑of‑failure for security." – replwoacause