Debian's apt lets a man-in-the-middle swap verified packages and run code as root
Debian apt security update: man-in-the-middle arbitrary code execution
Debian Security Advisory DSA-6607-1 covers CVE-2026-109518, found by Max Justicz in the apt package manager. When an HTTP redirect gives two different package downloads the same URI, apt can merge them, and improper file handling during download resume lets a man-in-the-middle attacker replace a package after verification, executing arbitrary code as root. The fix lands in apt 3.0.4 for trixie and also patches several out-of-bounds access issues.
Improper file handling when resuming an HTTP download allows a man-in-the-middle attacker to replace a package after verification, resulting in the execution of arbitrary code as root.
- iamnothere
Bonus, the man in the middle can see what packages you’re downloading since you’re not using HTTPS, so they know if you’re vulnerable during an update.
I never understood the insistence on using HTTP as a default for apt. Once HTTPS transport was available and tested (which took forever btw) then it should have become the default. Maybe this will spur some changes.
- vesinisa
No word as of yet if Ubuntu's apt is also impacted.
Sounds like the vulnerability is in the HTTP handling code, and because apt downloads packages over plain HTTP a man-in-the-middle position would be enough to exploit it.
It almost seems like a repeat of two previous apt vulnerabilities:
In 2019: https://lists.debian.org/debian-security-announce/2019/msg00...
And in 2014: https://lists.debian.org/debian-security-announce/2014/msg00...
- Avamander
Not surprised at all. I remember all of the heated discussions (even here on HN) around there being absolutely no need for HTTPS because "everything is signed with PGP".
Exposing all of the internals of something to any and all MITM keeps on demonstrating how it's a dangerous idea.
Hopefully this example settles at least some of this pointless discussion.
- greggsy
> We recommend that you upgrade your apt packages.
Is there a German word for a broken tool that can only be fixed by using the same broken tool?
- serbuvlad
It's always been strange to me and I've been saying forever that I don't get why package repos don't use HTTPS.