# Debian's apt lets a man-in-the-middle swap packages and run code as root

Original title: Debian apt security update (man-in-the-middle)

> Hacker News story 50366575 · language: en · submitted 2026-11-04
> Web version: https://zeli.app/story/50366575
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 146 · by [SG-](<https://news.ycombinator.com/user?id=SG->) · 💬 31
[original](<https://lists.debian.org/debian-security-announce/2026/msg00526.html?pow_referer=>) · [HN discussion](<https://news.ycombinator.com/item?id=50366575>)

## Summary

Debian Security Advisory DSA-6607-1 patches CVE-2026-109518 in apt, the package manager. Max Justicz found that when an HTTP redirect gives two downloads the same URI, apt can merge them, and improper file handling during download resumption lets a man-in-the-middle attacker replace a package after verification, executing arbitrary code as root. Fixed in apt 3.0.4 for trixie, along with several out-of-bounds access fixes.

## Key quote

> 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.

## HN discussion (31 comments)

### [justicz](<https://news.ycombinator.com/item?id=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 to find now. It’s becoming borderline irresponsible not to audit your internet-facing code with modern AI tools.
>
> [0] https://x.com/just1cz/status/2118009777922228361

### [linsomniac](<https://news.ycombinator.com/item?id=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

### [thewisenerd](<https://news.ycombinator.com/item?id=50366828>)

> dupe (2h ago): https://news.ycombinator.com/item?id=50364814

### [getcrunk](<https://news.ycombinator.com/item?id=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?

### [8organicbits](<https://news.ycombinator.com/item?id=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.
>
> edit: On lobste.rs I see a recommendation for `apt download`: https://lobste.rs/s/h7bvma/man_middle_arbitrary_code_executi...

---

## Cite

- Page: https://zeli.app/story/50366575
- Date: 2026-11-04
- Source: lists.debian.org (https://lists.debian.org/debian-security-announce/2026/msg00526.html?pow_referer=)
- Hacker News: https://news.ycombinator.com/item?id=50366575

## Other languages

- zh: https://zeli.app/zh/story/50366575 · markdown: https://zeli.app/zh/story/50366575.md
- ja: https://zeli.app/ja/story/50366575 · markdown: https://zeli.app/ja/story/50366575.md
- ko: https://zeli.app/ko/story/50366575 · markdown: https://zeli.app/ko/story/50366575.md
- de: https://zeli.app/de/story/50366575 · markdown: https://zeli.app/de/story/50366575.md
- es: https://zeli.app/es/story/50366575 · markdown: https://zeli.app/es/story/50366575.md
- ru: https://zeli.app/ru/story/50366575 · markdown: https://zeli.app/ru/story/50366575.md
