Zod repo backdoored: malicious commits blocked before reaching npm
Malicious commits were pushed to colinhacks/zod on GitHub, carrying a loader that queried an Ethereum smart contract for its next-stage download location. Per GitHub's advisory, npm's publish-time scanning blocked the one submitted malicious version, @nubjs/nub@0.9.4, while the zod and standard-schema changes never reached the registry.
- Malicious files hid in test paths: packages/zod/meta.test.mjs and packages/mini/meta.test.mjs
- Loader used preinstall/postinstall hooks and read a delivery address from an Ethereum contract
- npm blocked @nubjs/nub@0.9.4 at publish time; zod and standard-schema changes were never published
- Payload SHA-256: 5ed518aaff5aebc729545b8eb223ec31927cd1bfa53169517f09cdbcc9fd5a0b
Read next
Security