News for hackers. Stuff that matters.
Re:Debian apt security update (man-in-the-middle) by 8organicbits on Wednesday November 04, 2026 @10:17AM (#50366797)
I feel like they should release manual update instructions since the update mechanism is vulnerable. Although I see my systems already updated via unattended upgrades.
Re:Debian apt security update (man-in-the-middle) by xeyownt on Wednesday November 04, 2026 @03:22PM (#50370974)
CVE says you need a non zero retries, so you can use Acquire::Retries=0 to avoid the issue completely (unless your packages were modified already of course).
Re:Debian apt security update (man-in-the-middle) by thewisenerd on Wednesday November 04, 2026 @10:19AM (#50366828)
Re:Debian apt security update (man-in-the-middle) by opengrass on Wednesday November 04, 2026 @10:30AM (#50367003)
Congrats on the Rust rewrite I guess.
Re:Debian apt security update (man-in-the-middle) by klez on Wednesday November 04, 2026 @11:06AM (#50367573)
I'm pretty sure apt is written in C++. Am I remembering wrong?
Re:Debian apt security update (man-in-the-middle) by Palomides on Wednesday November 04, 2026 @11:10AM (#50367644)
parts of apt are being redone in rust, but anyway this seems to be a logic bug (in c++ code)
Re:Debian apt security update (man-in-the-middle) by justicz on Wednesday November 04, 2026 @11:19AM (#50367791)
I found this! I posted a semi-click-bait-ey tweet about it here [0], I think it’s important for people know how easy these bugs are becoming to find. It’s becoming borderline irresponsible not to audit your internet-facing code with modern AI tools.

[0] https://x.com/just1cz/status/2118009777922228361

Re:Debian apt security update (man-in-the-middle) by justicz on Wednesday November 04, 2026 @11:21AM (#50367834)
Speaking of which… if any of y’all work on security at OpenAI I have some questions for you about Daybreak! Please email me
Re:Debian apt security update (man-in-the-middle) by guessmyname on Wednesday November 04, 2026 @10:59PM (#50374995)
Every security engineer with access to Daybreak (Red or Blue) has a direct communication channel to OpenAI through an assigned Account Executive, or at least your employer does. If you are independent and authorized to use the model, your best option is to email/chat via the support page.
Re:Debian apt security update (man-in-the-middle) by sczi on Wednesday November 04, 2026 @11:39AM (#50368128)
Nice work! A similar vulnerability in 2019 also found by you included the recommendation to update with:

  apt -o Acquire::http::AllowRedirect=false update
  apt -o Acquire::http::AllowRedirect=false upgrade
Since this also involves redirects, would that protect users while updating apt for this one also?
Re:Debian apt security update (man-in-the-middle) by justicz on Wednesday November 04, 2026 @01:16PM (#50369413)
That sounds right to me, but FYI the APT maintainers themselves are recommending Acquire::Retries=0 as the mitigation since some mirrors might actually have redirects.
Re:Debian apt security update (man-in-the-middle) by winny314 on Wednesday November 04, 2026 @08:42PM (#50373995)
I saw the ubuntu announcement also defers to the `apt upgrade -o Acquire::Retries=0` recommendation

https://ubuntu.com/blog/apt-vulnerability-fixes-available

Re:Debian apt security update (man-in-the-middle) by DavCreator on Wednesday November 04, 2026 @12:32PM (#50368819)
Re:Debian apt security update (man-in-the-middle) by vesinisa on Wednesday November 04, 2026 @01:19PM (#50369446)
Looks like you also found a similarly critical apt bug in 2019: https://lists.debian.org/debian-security-announce/2019/msg00...

Do you think there might be even more still lurking out there?

Re:Debian apt security update (man-in-the-middle) by justicz on Wednesday November 04, 2026 @01:22PM (#50369504)
I do. I think that security-critical but overly complex software like this should be rewritten and certain aspects of it formally verified, since such things are now practical.
Re:Debian apt security update (man-in-the-middle) by justicz on Wednesday November 04, 2026 @01:29PM (#50369605)
HTTPS would have mitigated this particular bug but it feels like rearranging deck chairs on the titanic to fight over that right now. We need to audit everything with powerful AI like, yesterday.
Re:Debian apt security update (man-in-the-middle) by solyin on Wednesday November 04, 2026 @02:16PM (#50370218)
I'm sure Debian was invited to take part in Project Glasswing back at the beginning of this year.

I wonder if all the people who laughed off Anthropic's sensationalistic claims about Mythos as marketing fluff have recanted, or if they're too busy patching, or maybe they're stochastically parroting Ed Zitron's latest blather.

Re:Debian apt security update (man-in-the-middle) by nout on Wednesday November 04, 2026 @04:53PM (#50372072)
This is also a reason why I'm trusting less and less the companies that strongly push against AI. Especially for SaaS type of businesses, AI red teaming is now a critical part of development process.
Re:Debian apt security update (man-in-the-middle) by SoftTalker on Wednesday November 04, 2026 @11:26AM (#50367921)
How would an attacker inject a redirect into an apt package download?
Re:Debian apt security update (man-in-the-middle) by mikepurvis on Wednesday November 04, 2026 @11:33AM (#50368033)
MITM on the network, I guess like DNS takeover or the like.

So you pass through the upstream headers but then simulate a failure/resume and supply different contents for the resumed download.

Re:Debian apt security update (man-in-the-middle) by SoftTalker on Wednesday November 04, 2026 @11:39AM (#50368123)
So apt doesn't verify signatures on what is actually downloaded?
Re:Debian apt security update (man-in-the-middle) by dinosaurdynasty on Wednesday November 04, 2026 @11:48AM (#50368257)
> Improper file handling when resuming an HTTP download allows a man-in-the-middle attacker to replace a package after verification

from the OP

APT can use HTTPS, but often doesn't, making a MITM attack easier (also the idea for a long time has been signatures are enough, and/or TLS certs used to be a lot harder to get, but at this point you should really be using both).

Re:Debian apt security update (man-in-the-middle) by SoftTalker on Wednesday November 04, 2026 @12:10PM (#50368544)
Still doesn't make sense to me. So package A is downloaded, signature verified, then package B is downloaded, but somehow the package A file is replaced? Is it something like that?
Re:Debian apt security update (man-in-the-middle) by tosti on Wednesday November 04, 2026 @01:08PM (#50369307)
The somehow is package B has the same filename as package A.
Re:Debian apt security update (man-in-the-middle) by xeyownt on Wednesday November 04, 2026 @03:03PM (#50370751)
The bug is not trivial, I asked my AI friend to analyze.

To summarize, APT may have several download sessions in parallel, which may download the same "resources". To save bandwidth, disk storage, these same resources are downloaded only one, but given different names on the disk through hard links.

Because of HTTP retry, APT may be lured into downloading again a resource, but that was associated with a different package name, package that was already checked (hash verified). This is because of some differences between the package name / filename / URI, etc.

Anyway, the point is that hash are verified when a package is completed, but because of possible parallel downloads and hard links usage, a verified package can be rewritten.

What I find crazy though is that why packages are not first completely all downloaded, then every time a package is used, the hash be verified before being used. This would reduce even further the surface of attacks, and I don't care about any performance impact.

Re:Debian apt security update (man-in-the-middle) by SoftTalker on Thursday November 05, 2026 @11:34AM (#50381189)
> What I find crazy though is that why packages are not first completely all downloaded, then every time a package is used, the hash be verified before being used. This would reduce even further the surface of attacks, and I don't care about any performance impact.

Yes I'm amazed to learn this is not the case. Without that, any local exploit that could replace a file could potentially replace a downloaded, "already verified" package.

Re:Debian apt security update (man-in-the-middle) by mikepurvis on Monday November 09, 2026 @04:32PM (#50432505)
If you can replace a local file that's owned and writable only by root, then it's already game over anyway.
Re:Debian apt security update (man-in-the-middle) by thayne on Wednesday November 04, 2026 @12:45PM (#50369003)
Https doesn't help with this if the MitM is the apt mirror you are using.

One reason http is still used is because you need an independent signature anyway since it is common to use mirrors that don't have the same level of trust as the debian maintainers

Re:Debian apt security update (man-in-the-middle) by hollow-moe on Wednesday November 04, 2026 @11:56AM (#50368372)
But how do I update apt if apt is untrustable until fixed ? Good ol' .deb scp'd in dpkg'd.
Re:Debian apt security update (man-in-the-middle) by ChrisArchitect on Wednesday November 04, 2026 @11:57AM (#50368386)
Re:Debian apt security update (man-in-the-middle) by linsomniac on Wednesday November 04, 2026 @02:01PM (#50370031)
For those of you not familiar, apt-cacher-ultra is fairly new (~9 months old), and it can reduce your exposure to this. It uses a completely different mechanism for verifying signatures, and does validate signatures, so if your apt clients grab the packages from the cache, it shouldn't be open to this bug.

The next version is going to include TLS and ACME support for the client->cache connection.

https://github.com/linsomniac/apt-cacher-ultra

Re:Debian apt security update (man-in-the-middle) by xeyownt on Wednesday November 04, 2026 @03:13PM (#50370868)
We are living in times where I read first in HN what apticron is going to send me by mail.
Re:Debian apt security update (man-in-the-middle) by getcrunk on Wednesday November 04, 2026 @03:26PM (#50371020)
It always bothered me that apt didn’t use encryption, I know the issue here doesn’t boils down to that, but damn this sucks.

Sure I can update, but how to check I want compromised? Will apt check the state of past/installed updates?