frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Zod 4.6.6 compromised by malware?

https://github.com/colinhacks/zod/commit/d821685ea6732436fcdf786a81d076958471e467
108•luggage_bazooka•1h ago

Comments

luggage_bazooka•1h ago
The most recent version 4.6.6 has a very interesting commit (d821685) "Fix bugs and improve performance", that contain the following changes https://github.com/colinhacks/zod/commit/d821685ea6732436fcd...

I didn't study what packages/mini/meta.test.mjs is doing in particular but it's not looking great

throwawayffffas•46m ago
Not looking great is an understatement. You should raise more alarms at github. And people should try to reach the maintainers.
niek_pas•40m ago
This might be a hint:

    const R=["https://eth.llamarpc.com","https://ethereum-rpc.publicnode.com","https://cloudflare-eth.com"]
erzhan89•46m ago
malicious remote-code loader
jaapz•44m ago
Might is pretty tame, it is infected - EDIT: title was changed, it said "might be infected".

The malware seems to inject some JS payload to execute when zod is installed, by fetching it from an ethereum smart contract (if I understand it correctly).

Don't forget to flag the version on npm.

EDIT: looks like the update never got on NPM: https://news.ycombinator.com/item?id=50053253

SlightlyLeftPad•41m ago
Right, 3 seconds in, as soon as I saw “ethereum” in a typescript validator the first thought was the same.
rarisma•42m ago
Yep, def looks bad.

Just pasted the code into claude to try and decipher the minified js and looks like it tries to find the server via the blockchain? and then download further stuff from there.

SlightlyLeftPad•40m ago
Don’t even need to go that far, it refers to ethereum in plain text.
citbl•41m ago
This is so bad it doesn't even try to hide itself.
throwawayy6767•41m ago
What are we looking at exactly? Gia Tan situation? Prompt injection?
MisterMunchkin•41m ago
That is 100% a compromised repo. It's a malware downloader.

I feel like they could have done a better job here. Having just a few changes, one of which is a huge blob of blatantly compromising code, is just too obvious.

The URLs are interesting, I don't do anything in this area but I didn't know that you could use the blockchains to hide your command and control URL, in a way that allows you to remotely update the URL whenever you want. It turns out there is a use for blockchain! Making control URLs immune to takedowns!

xx_ns•39m ago
Interestingly, they added the `preinstall` key (that is supposed to run the malicious script when installed) under the package.json root, and not under `scripts`, so from what I can tell this wouldn't run on install.

Otherwise, yeah, this seems like a stage-1 loader for fetching and running a payload off the Ethereum mainnet.

nicce•25m ago
Great reminder to always disable these scripts unless going through the hassle to verify if it does something absolutely useful.
jaynetics•38m ago
The compromised code wasn't actually released. This write-up has a lot of information:

https://github.com/orgs/community/discussions/208477

luggage_bazooka•24m ago
Close call, nevertheless, it's silly to keep that commit on the release page.
steve_taylor•10m ago
It's silly to not have rewritten it out of git history.
Jarred•37m ago
I haven’t downloaded the tarball to verify, but it looks like it was reverted prior to the GitHub release:

https://github.com/colinhacks/zod/commit/10dda3a3a4bc76ed0bf...

blueblazin•35m ago
How is this even possible? The change is small and literally has an ethereum URL in the code changes. How did it go through?
rfgplk•32m ago
LGTM
ozyschmozy•19m ago
From the repo owner:

> Seems like a git push credential of some kind was compromised, not an npm or GitHub token. Still working with the GitHub team to get some better forensics on what/how. The attack consisted of malicious commits and tagged pushes to main.

So it didn't go through review, it was pushed straight to main. It also seems their publishing pipeline was already secured against this sort of thing:

> Zod's release flow was already secured against kind of attack via trusted publishing and a dedicated GitHub environment for secure deployments. Zod's release CI worked as designed and was already secure against this; NPM's malware scanning didn't prevent any malicious here.

oraro•31m ago
classic crypto people doing classic crypto things
yuvalkarmi•19m ago
This is 3 weeks back, folks. It WAS real repository compromise - it made it to Zod's main, but not to npm.

On September 21, someone used Colin's git credentials to push this compromised code into the project, Colin caught it, and reverted it that same day (PR #6620). He subsequently did release 4.6.6 on October 11, but it did NOT contain the infected code.

Btw, Zod wasn't the only package targeted - same attack was attempted against standard-schema and nub. Nub DID make it to npm, but npm's malware scanning blocked it.

Looks like a legit (well, illegitimate) attempted supply-chain attack, but no actual Zod release was compromised.

hizlikovboy27•12m ago
I have many projects using this library. do u think the situtation is urgent, a code red? I will need to talk to clients accordingly.
ralusek•7m ago
Never made it to npm you're fine

Postgres isn't slow, your storage is

https://clickhouse.com/blog/posette-talk-recap-postgres-isnt-slow-your-storage-is
65•saisrirampur•2h ago•34 comments

Type-safe HTML templating in Zig

https://lalinsky.com/2026/10/11/type-safe-html-templating-in-zig.html
110•lukaslalinsky•4h ago•46 comments

Fingerprints are the new cookies

https://royfish.dev/fingerprints-are-the-new-cookies
355•royfish•10h ago•170 comments

Calculus with Julia

https://jverzani.github.io/CalculusWithJuliaNotes.jl/
120•subset•1d ago•10 comments

Total Annihilation, rebuilt for modern computers

https://nanolathe.gg
497•jttnr•15h ago•198 comments

Running the unmodified Linux amdgpu driver on an iPad

https://github.com/Geramy/LemonSeed-Studio
17•joshcsimmons•22h ago•6 comments

Zod 4.6.6 compromised by malware?

https://github.com/colinhacks/zod/commit/d821685ea6732436fcdf786a81d076958471e467
110•luggage_bazooka•1h ago•28 comments

Whatever became of holography? (2011)

https://www.americanscientist.org/article/whatever-became-of-holography
128•cainxinth•9h ago•63 comments

Cartographers of North Korea (2019)

https://cartographers-nk.wonyoung.so/
255•edent•13h ago•46 comments

Terence Tao: Math 2.0 [pdf]

https://teorth.github.io/tao-web/slides/math-2-0-caltech-2026.pdf
393•Anon84•19h ago•423 comments

Will Linux phones become a viable alternative to the Android/iOS duopoly?

https://amosbbatto.wordpress.com/2026/10/05/linux-phones-alternative/
140•amosbatto•4h ago•144 comments

Doory – Open-Source Canva

https://github.com/shaongitbd/doory
109•acley•8h ago•38 comments

The gap in shared understanding of LLM capability is widening

https://twitter.com/karpathy/status/2109361546505966046
450•albertzeyer•12h ago•642 comments

Local Indexing to reduce tool calling and token usage

https://tedhaley.ca/pensieve/
77•TedHaley•9h ago•18 comments

Loop Engineering: Optimizing Code Generation and Verification

https://bradleygibbs.dev/posts/loop-optimization/
8•bradleygibbs•18h ago•3 comments

No portable way to detect string-to-float conversion errors in standard C

https://sebsite.pw/w/20261009-strtod.html
48•signa11•1d ago•40 comments

Illustration Beyond Proof

https://terrytao.wordpress.com/2026/10/11/illustration-beyond-proof/
64•smilelamp•9h ago•3 comments

Research Firm Calls Anthropic's IPO 'Unprecedented Test of Investor Gullibity'

https://www.cnbc.com/2026/10/07/anthropic-will-be-most-ridiculous-ipo-of-year-analyst-says.html
52•m463•4h ago•13 comments

Passkeys are a trap

https://nonfunctional.substack.com/p/passkeys-are-a-trap-do-not-use-them
603•laurex•11h ago•354 comments

Every US Electrical Outlet Explained [video]

https://www.youtube.com/watch?v=n_1wzYQwnts
24•zdw•1d ago•28 comments

Chapter 1 of "Ways of Seeing" by John Berger (1972)

https://www.ways-of-seeing.com/ch1
108•rafael859•14h ago•18 comments

Show HN: PS2 games statically recompiled to WebAssembly

https://github.com/snuri00/ps2-web-recomp
11•deadxwarrior•2h ago•0 comments

Programmable pigments: Photochromic nanoparticle inks for rewritable tattoos

https://www.cell.com/matter-light/fulltext/S3117-5848(26)00119-5
50•Bluestein•23h ago•36 comments

So, you’d like to sell your print issues of The Onion?

https://theonion.com/archivehunt/
320•mooreds•13h ago•48 comments

Ask HN: Do you want a router that has DD-WRT pre-installed?

52•Ixander•1d ago•54 comments

NYC's "Click to Cancel" rule is now in effect

https://www.nyc.gov/main/click-to-cancel
469•gregsadetsky•15h ago•220 comments

Vectorized CLZ and CTZ

https://purplesyringa.moe/blog/vectorized-clz-and-ctz/
44•zX41ZdbW•1d ago•5 comments

Crest – an Arc-inspired open-source browser for Mac

https://crestbrowser.com/
16•cobychapple•5h ago•13 comments

I guess I'm using WebP now?

https://anderegg.ca/2026/10/08/i-guess-im-using-webp-now
107•Brajeshwar•2d ago•118 comments

Google Data Centers around the world

https://datacenters.google/locations/
54•andsoitis•10h ago•51 comments