Re:NPM debug and chalk packages compromised
by SSLy on Monday September 08, 2025 @12:19PM
(#45170187)
Can you post full message headers somewhere? It'd be interesting which MTA was involved in delivery from the sender's side.
[ Parent
| on HN ]
Re:NPM debug and chalk packages compromised
by alexellisuk on Monday September 08, 2025 @01:37PM
(#45171252)
How did simply opening this email in something like Gmail or a desktop client result in it being able to compromise NPM packages under your control?
I'm just curious - and as a word of warning to others so we can learn. I may be missing some details, I've read most of the comments on the page.
Re:NPM debug and chalk packages compromised
by junon on Monday September 08, 2025 @01:41PM
(#45171314)
I clicked the link like a genius :)
Re:NPM debug and chalk packages compromised
by osa1 on Monday September 08, 2025 @02:25PM
(#45171927)
I don't understand. The link could've come from anywhere (for example from a HN comment). How does just clicking on it give your package credentials to someone else? Is NPM also at fault here? I'd naively think that this shouldn't be possible.
For example, GitHub asks for 2FA when I change certain repo settings (or when deleting a repo etc.) even when I'm logged in. Maybe NPM needs to do the same?
Re:NPM debug and chalk packages compromised
by koil on Monday September 08, 2025 @02:30PM
(#45171987)
As OC mentioned elsewhere, it was a targeted TOTP proxy attack.
Re:NPM debug and chalk packages compromised
by hughw on Monday September 08, 2025 @03:18PM
(#45172637)
So, he clicked the link and then entered his correct TOTP? how would manually typing the url instead of clicking the link have mitigated this?
Re:NPM debug and chalk packages compromised
by Mogzol on Monday September 08, 2025 @03:30PM
(#45172796)
They wouldn't have manually typed the exact URL from the email, they would have just typed in npmjs.com which would ensure they ended up on the real NPM site. Or even if they did type out the exact URL from the email, it would have made them much more likely to notice that it was not the real NPM URL.
Re:NPM debug and chalk packages compromised
by dboreham on Monday September 08, 2025 @02:42PM
(#45172119)
OP entered their credentials and TOTP code, which the attacker proxied to the real npmjs.com
FWIW npmjs does support FIDO2 including hard tokens like Yubikey.
They do not force re-auth when issuing an access token with publish rights, which is probably how the attackers compromised the packages. iirc GitHub does force re-auth when you request an access token.
Re:NPM debug and chalk packages compromised
by osa1 on Monday September 08, 2025 @04:44PM
(#45173739)
> They do not force re-auth when issuing an access token with publish rights, which is probably how the attackers compromised the packages
I'm surprised by this. Yeah, GitHub definitely forces you to re-auth when accessing certain settings.
Re:NPM debug and chalk packages compromised
by alexellisuk on Monday September 08, 2025 @01:47PM
(#45171400)
:-( How did the link hijack your password/2fa? Or did you also enter some stuff on the form?
Re:NPM debug and chalk packages compromised
by SSLy on Monday September 08, 2025 @12:52PM
(#45170638)
let's see the header of interest:
Received: from npmjs.help by smtp.mailtrap.live
Re:NPM debug and chalk packages compromised
by XxgodReixX88 on Monday September 08, 2025 @02:31PM
(#45172000)
what about it?