It appears that someone(s) has submitted numerous malicious updates to various AUR packages (400+ was the last I saw). The main change is adding npm as a dependency and then installing a package from there, but they also alter the maintainer’s e-mail address without changing the underlying name. There are also some more recent commits using a different dependency.
The earliest reference to this I saw on the Arch mailing list is from May 30. The main reporting thread has a list of the packages known to have been compromised, although it’s not clear which of these have been rolled back.
hm, so this is new, looks like a supply chain attack on the actual AUR infrastructure and not just someone that scammed/compromised a single package developer like in the past
there sure are a lot of people claiming people don’t read PKGBUILDs on updates
I know my coworker doesn’t, but come on. The few lines diff literally gets shown to me every update for whatever third-party package happens to have an update.
plenty of those armchair comments are making me murderous tbh…par for the course I guess.
I also wonder how many people seem to think reading PKGBUILDs is some kind of cure to the underlying issue, wouldn’t it be trivial to just hide the exploit in a .patch file, or use some other kind of obfuscation? Just enough to pass the scrutiny of 90% of the users who even check the diffs? But I guess an attack of this scale will be found out anyhow, so presumably the goal is to get in enough of systems early on.
Reading PKGBUILDs is necessary, but I agree it is not enough once the payload can be hidden in generated files, patches, or a fetched dependency. For AUR packages I care about, the practical baseline is: diff every update, avoid auto-updating AUR blindly, prefer upstream/source builds over npm/curl blobs, and keep a short list of AUR packages installed so you can audit them after events like this. Also worth checking shell history/package cache for anything upgraded in the affected date range.
It’s like saying “people should be more careful” after a bunch of people get crushed in an industrial accident.
Technically true, but not useful because it ignores human behavior (i.e. predictable failings) and the limits we have on our time, energy, and technical capability. It’s nothing more than self-satisfied contempt.
The actual fix is to look at what went wrong, and implement a safety system that is difficult to bypass.
It’ll be interesting to see what else we are blindly trusting that has no security speed bumps at all.
Just in case, but I meant PKGBUILD in the most simplistic case.
If someone drops in a .patch file, that’s still going to show up in the git diff when you pull the updated package, and a reasonable AUR helper should show that diff to you as well (paru definitely does for me). In this particular attack, it wasn’t the PKGBUILD that had the fishy npm call. See for example, Malicious activity on plex-media-player pkgbuilds - Aur-general - lists.archlinux.org —this is exactly the output paru would’ve asked me to approve before updating: a few additional lines that clearly look suspicious.
Of course, an attacker could try to obfuscate, but that attempt is still going to show up in the diff. As far as I’m concerned, the user who decides to use a user-submitted build definition from the AUR (as opposed to using an Arch-maintained package, or building it/writing that definition yourself) is responsible for reading and understanding that definition up until the actual upstream source code repository (because that’s the thing we typically inherently trust, even though it could also be compromised, but at that point it becomes the developer’s responsibility).
The AUR is largely meant for niches. It’s like what deviantart can be for Windows themes and icons. There are a lot of folks who seem to think there should be considerable safeguards added, but to me it doesn’t make sense for Arch to be introducing more friction for user submissions. (I would probably agree that package adoption should probably be treated with more care, though.)
No, it’s not (but I understand where you’re coming from and that is generally the sentiment I have with most things), because every time you use the AUR you are basically running curl $URL | bash. And people do that all the time. Is curl and/or bash somehow responsible for implementing a safety system that’s difficult to bypass?
Even if, an ASN gets hijacked and ends up rerouting requests for said site? The internet is fragile. The only surefire way to ensure you’re getting what you want is to fetch, review (even if you leave it to other tooling), and execute.
There is no proper package manager for the AUR. You use git to clone the repo, and you use makepkg to build it. The thought did pass through my head that an AUR helper could maybe use some tooling to scan for issues but it would be unlikely that every single helper would fall in line.
To understand how this happened, you need to know one specific thing about how the AUR works: anyone can adopt an orphaned package. When a maintainer abandons a project, the package gets marked unmaintained and becomes fair game. Any AUR account can submit a change to the PKGBUILD and associated install scripts. There’s no review gating, no vouching system, no delay period.
This sounds like madness, what is the logic behind that system?