RetroFed Forum
Your home away from modern life.
NPM provides cross-platform packages for your Javascript needs
Post Reply
AuthorMessage
Ludrol szmer.info Ludrol@szmer.info
Joined: 2023-06-12
Quote

336   Original
jankforlife lemmy.ml jankforlife@lemmy.ml
Joined: 2025-09-05
#2 · Quote Reply

OOTL

11
Willem kutsuya.dev Willem@kutsuya.dev
Joined: 2023-07-05
#3 · (edited) Quote Reply

OOTL

lemmy loop you in: https://infosec.exchange/@ifin/116735279416101129

TL;DR; lots of aur packages got hijacked and install a infostealer, if you updated today/yday, there is a reasonable chance you got hit by it :(

also: the info stealer is installed by aur via npm

34
bacon_pdp lemmy.world bacon_pdp@lemmy.world
Joined: 2024-01-02
#4 · Quote Reply

[deleted]
93
dan upvote.au dan@upvote.au
Joined: 2023-06-14
#5 · (edited) Quote Reply

npm is finally going to disable postinstall scripts by default in the next major version at least, copying what other JS package managers like pnpm do. They also added a setting for minimum age (only install package versions that are at least X days old) which is meant to help too - the idea being that malware will have been detected and removed before anyone installs it.

People use third-party Linux package repos all the time though, and they have similar attack vectors. If I can convince you to add my Debian/RPM/whatever repo, I can create a package with the same name as a common one but with a newer version number, and apt upgrade will happily replace the official package with my malicious one.

This is intentional for several reasons (e.g. deb.sury.org has PHP packages that replace the official Debian ones) but I'm really surprised we don't see more supply chain attacks via third party deb/rpm repos.

Maybe it's because the barrier to entry is higher? With a custom deb repo (either self-hosted or using something like Packagecloud or Ubuntu PPA), you need to create the repo, create Debian packages, add them to the repo (eg using Aptly), GPG sign the repo, and convince people to add the repo. npm is just one repo with everything in it.

63
h4x0r lemmy.dbzer0.com h4x0r@lemmy.dbzer0.com
Joined: 2024-12-11
#6 · Quote Reply

If you are too stupid to read the PKGBUILD then you probably deserve it.

-50
fonix232 fedia.io fonix232@fedia.io
Joined: 2023-06-13
#7 · Quote Reply

[deleted]

Well it does stand for Node Packaged Malware soooo

27
redsand infosec.pub redsand@infosec.pub
Joined: 2025-04-09
#8 · Quote Reply

[deleted]

Node in general. Especially the core devs.

7
pnwpixel programming.dev pnwpixel@programming.dev
Joined: 2026-04-22
#9 · Quote Reply

lemmy loop you in: https://infosec.exchange/@ifin/116735279416101129 TL;DR; lots of aur packages got hijacked and install a infostealer, if you updated today/yday, there is a reasonable chance you got hit by it :( also: the info stealer is installed by aur via npm

I bet you've been itching to drop that clever pun out for quite some time lol

12
Ooops feddit.org Ooops@feddit.org
Joined: 2024-07-06
#10 · Quote Reply

If you are too stupid to read the PKGBUILD then you probably deserve it.

People tend to read them the first time when installing stuff, yet rarely think about the scenario of a well used package taken over by a malicious actor making changes.

24
Big Baby Thor sopuli.xyz thorhop@sopuli.xyz
Joined: 2025-04-10
#11 · Quote Reply

[deleted]

This is exactly why distros decided to package pypi, npm and several other scripting package managers- just to make sure you don't break dependency.

Actually, with something like Fedora Hummingbird you can choose a different point of distribution, relying on human moderators instead of automated processes.

Of course there's always chainguard.

6
Midnight Wolf lemmy.world wreckedcarzz@lemmy.world
Joined: 2023-08-23
#12 · Quote Reply

If you are too stupid to read the PKGBUILD then you probably deserve it.

Weird way to out yourself but

8
The Stoned Hacker lemmy.world erev@lemmy.world
Joined: 2023-06-24
#13 · Quote Reply

npm is finally going to disable postinstall scripts by default in the next major version at least, copying what other JS package managers like pnpm do. They also added a setting for minimum age (only install package versions that are at least X days old) which is meant to help too - the idea being that malware will have been detected and removed before anyone installs it. People use third-party...

not only do you have to setup the infrastructure to host multiple repositories (deb, rpm), you also have to build and deploy multiple packages of sufficient quality that you don't break something else, which for a common/popular package would make the malware immediately noticeable.

2
TwilightKiddy programming.dev TwilightKiddy@programming.dev
Joined: 2023-06-12
#14 · Quote Reply

npm is finally going to disable postinstall scripts by default in the next major version at least, copying what other JS package managers like pnpm do. They also added a setting for minimum age (only install package versions that are at least X days old) which is meant to help too - the idea being that malware will have been detected and removed before anyone installs it. People use third-party...

Convincing people to use it is also hard.

When I'm looking for a package that's not in the official repos, I add only either popular repos with active maintainers who do regular updates or ones from packagers I know personally.

First one is hard to fake for obvious reasons. I guess someone could try to know me personally and somehow engineer a situation where I would want to have a piece of software that they package, but that's arguably even harder to pull off and is certainly not worth it for stealing one nerd's worth of money.

9
Ludrol szmer.info Ludrol@szmer.info
Joined: 2023-06-12
#15 · Quote Reply

OOTL

400+ Arch Linux AUR Packages Compromised in a Supply Chain Attack Deploying Infostealers

3
spez sh.itjust.works spez@sh.itjust.works
Joined: 2023-06-13
#16 · Quote Reply

2
Post Reply
Back to top