Hijacking AUR Packages by Searching for Expired Domains
Some AUR packages download their build sources from domains that have since expired, so anyone who registers such a domain can serve their own files. Where the package also skips checksum verification, an attacker could get code execution on a victim's machine when they install and run the package.
Published on blog.nietaanraken.nl
The Arch User Repository (AUR) is a software repository for Arch Linux. It differs from the official Arch Linux repositories in that its packages are provided by its users and not officially supported by Arch Linux.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the package recipes point at domains that are no longer owned by the original authors, and some of them replace real checksums with SKIP, so downloaded files are never verified.
Impact
An attacker who registers an expired domain could achieve arbitrary code execution on machines where a vulnerable package is installed and run, though the affected packages are broken and used by few, if any, people.
What the attacker needed
An expired domain used by a package; package uses SKIP for checksums; victim installs and runs the package
The fix
Package maintainers should set real hash values for every source instead of SKIP, and the vulnerable packages were deleted after deletion requests.
How it was found
- Collect the source URLs from every package's metadata file.
- Resolve the domains and keep only those with no address record, then check which are expired.
- Register one of the expired domains and host files at the same paths the recipe expects.
- Install the package with an AUR helper, which downloads the attacker's files.
- Run the installed program, which executes the attacker's script.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The Arch User Repository (AUR) is a place where volunteers publish recipes for building software on Arch Linux. Those recipes often download files from a website, and if that website's domain has lapsed, a stranger can buy it and put their own files there. If the recipe does not check the downloaded file's fingerprint (a checksum), the stranger's code gets installed and run.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.