Debian apt security update: man-in-the-middle arbitrary code execution lists.deb...
HN Best 200 @best
Debian apt security update: man-in-the-middle arbitrary code execution lists.debian.org · 63 points · 53 comments · HN thread
TL;DR Debian published a security advisory for apt, its package manager, describing a flaw where an HTTP redirect can make apt merge two different package downloads, letting an attacker in a man-in-the-middle position get code executed after signature checks pass. Fixed versions are in trixie-security and bookworm-security, and the advisory recommends upgrading apt. The thread mostly argues that apt should default to HTTPS for package transport.
- The advisory says APT can merge two different package downloads after an HTTP redirect gives them the same URI, which can lead to arbitrary code execution.
- Exploitation requires a man-in-the-middle position, since apt downloads packages over plain HTTP by default and signatures are checked after download.
- Commenters' reading of the advisory: a legitimate package is verified, then a second download redirected to the same URL overwrites the file, and the already-verified status is still trusted.
- A fixed apt is available in trixie-security and bookworm-security, and commenters noted the update is needed from the older apt, which is itself vulnerable.
- A workaround suggested in the thread is disabling the Acquire::http::AllowRedirect option, which can be passed on the command line when upgrading apt.
- The thread recalls two earlier apt vulnerabilities from 2014 and 2019 and compares CVSS scoring for this one.
Discussion The comment thread is mostly about why apt uses plain HTTP by default and whether that choice is a mistake. Many commenters say the advisory vindicates long-standing arguments for HTTPS transport, while others reply that signed packages make transport security less critical and that HTTPS would not protect against a compromised mirror. Several commenters work through the likely exploit mechanics from the short advisory text, and others debate CVSS scoring and how practical the attack is. The mood is critical of Debian's communication, with some complaining the advisory gave no guidance on updating safely, but the tone stays technical and mostly constructive.
- Apt should default to HTTPS for package transport (many): Commenters say this flaw shows that exposing package traffic over plain HTTP is risky, since a MITM can see what is downloaded and exploit the update path. They argue HTTPS should have become the default once it was tested.
- Signatures already protect packages, so HTTP is acceptable (some): Some defend the design: packages are signed with Debian keys, so transport need not be trusted. They say the real bug is validation ordering, and that HTTPS would only hide bugs rather than fix the design.
- HTTPS does not protect against a bad mirror (a few): A minority notes that TLS does not help if the mirror itself is compromised, and that signatures cover that case. Others reply that a compromised mirror is much less likely than a MITM on typical networks.
- Debian's advisory gave too little upgrade guidance (some): Commenters criticize the announcement for only saying to upgrade apt, when the vulnerable apt is the tool needed to upgrade. They point to the redirect option as a partial workaround.
- Severity is lower than it looks (a few): Some argue the attack needs a MITM or a vetted mirror, a narrow window, and user interaction, so CVSS may overstate the risk. Others counter that MITM should be scored as high complexity rather than adjacent network.
Links from the comments