Skip to content
← All news
3 min read

Debian and Ubuntu patch an apt flaw that can give a network attacker root

An attacker on the network path, or a malicious mirror, could swap a verified package and run code as root. Fixes are out for Debian 12 and 13 and Ubuntu 22.04 and later, and Canonical advises turning retries off while you install them.

The default since Debian 12 and Ubuntu 22.04 is three retries. This apt bug needs at least one.

On November 4, 2026, Debian published DSA-6607-1 for apt, tracked as CVE-2026-109518. Debian says a man-in-the-middle attacker can replace a package after verification, which can lead to code execution as root. Ubuntu shipped the same fix in USN-8996-1 that day.

Max Justicz reported the flaw and Julian Andres Klode wrote the fix, per the CVE record. Canonical, which assigned the CVE, scores it 7.7 out of 10 on CVSS 4.0. Klode's maintainer note calls it critical. CISA's entry on the record, dated November 4, lists exploitation as none.

Two downloads can end up sharing one file

Debian says a redirect can give two package downloads the same URI, and apt merges them. Klode's note says redirects and transient server errors can trigger retries that overwrite existing hard links with a chosen payload. So a file that passed verification can change before it is installed.

The fix, dated October 12, makes apt open target files exclusively, so a write cannot follow a hard link into another package.

Exposure depends on a retry setting and plain HTTP

The attack needs a non-zero Acquire::Retries value, per the CVE record. The default has been 3 since Debian 12 and Ubuntu 22.04, so those releases and newer are exposed. Older releases are unaffected by default, but Klode notes that user scripts may set the option there. Canonical's blog post says every apt frontend is affected and snaps are not.

On HTTPS, Canonical says TLS protects against the flaw, but it calls that a mitigation only and still tells users to update. The CVE record also names malicious mirrors and proxies as attackers.

ReleaseFixed apt version
Debian 13 (trixie)3.0.4
Debian 12 (bookworm)2.6.2
Ubuntu 26.103.3.3ubuntu0.1
Ubuntu 26.04 LTS3.2.1ubuntu0.1
Ubuntu 24.04 LTS2.8.4ubuntu0.1
Ubuntu 22.04 LTS2.4.15ubuntu0.1
Source: Debian tracker and USN-8996-1

The Debian tracker still lists forky, the testing release, as vulnerable at 3.3.5. Ubuntu 20.04 and older get the fix through Ubuntu Pro.

The patch arrives through the client that has the bug

Debian's advisories say only to upgrade. Canonical also advises setting Acquire::Retries to zero while you install the update, because the flaw needs a retry.

# Check the installed version
apt-cache policy apt

# Upgrade with retries off (Canonical's command)
sudo apt update && sudo apt upgrade -o Acquire::Retries=0

What is not confirmed

No advisory mentions signed-by. Debian says the swap happens after verification, which suggests a per-repository key would not stop it, but no source tests that. Canonical says HTTPS protects against the flaw and that a malicious mirror can exploit it, but not whether HTTPS stops a malicious mirror.

A November 5 search found no public exploit code or write-up by Justicz. Neither Debian nor Canonical explains how to tell whether a past install was tampered with.

Why a build studio cares

Our reading: a Dockerfile that starts from an older base image runs that image's apt as root, so a patched build server does not help until the base image is patched. An attestation records what was built and by whom. It cannot show that the package apt installed is the one it verified. We would review images built with an affected apt version over a network path the builder did not control, such as a third-party proxy or mirror on plain HTTP. Nothing here shows any image was tampered with.

Next step: check the apt version on every host and in every base image against the table above, then read DSA-6607-1. If you want a second reviewer on your image builds, see our software audits.

SecurityOpen SourceInfrastructureDev ToolsDebianUbuntuAPTCVE2026109518LinuxDockerSupplyChainSecurityDevSecOpsOpenSourceCyberSecurity

Ready to know?

Send what you want checked or built. Fixed scope, price, and date in writing inside 24 hours, or the website or audit fee on your first project is refunded in full.

24 clock hours. Weekends included.
Book a call