APT Vulnerability Lets Attackers Replace a Verified Package and Run It as Root
A flaw in APT allows a verified package to be replaced and then executed as root. Several Linux distributions, including Debian, Ubuntu and their derivatives, are affected. Here’s what we know about this vulnerability.
On November 4, 2026, the APT developers, Debian’s package manager, published a security advisory for CVE-2026-109518. On the same day, the Debian teams (DSA-6607-1 and DLA-4880-1) and Canonical released fixes for their distributions. Canonical assigned this vulnerability, discovered by Max Justicz, a CVSS 4.0 score of 7.7 out of 10. The name may not ring a bell, but in 2019 this same researcher had already uncovered a remote code execution flaw in APT (CVE-2019-3462), also tied to HTTP redirects.

How does this flaw work?
According to the APT team, a remote attacker can bypass verification of downloaded packages by combining HTTP redirects and temporary server errors. These errors cause APT to retry the download, and APT eventually overwrites existing hard links with attacker-chosen content. Since .deb packages are installed with root privileges, the result is arbitrary code execution as root on the Linux machine.
To exploit the flaw, the attacker must be able to manipulate HTTP traffic between the machine and the package server at the time of an installation. Canonical notes that this includes a malicious proxy or mirror. Normally, archive signatures protect against this scenario: APT checks the signed Release file first, then the checksum of each package. Here, the package is replaced after that verification, so the protection is bypassed.
There is still one important condition: APT must be configured to retry failed downloads via the Acquire::Retries setting. This option has been enabled by default since APT 2.3.2, meaning since Debian 12 and Ubuntu 22.04 LTS. Older versions are therefore not exposed by default, but the APT team warns that many scripts enable this setting.
Which distributions are affected?
The flaw is in APT itself: all commands and tools that rely on it are affected (apt, apt-get, aptitude, graphical software centers). Snap packages are not affected. Here is the current status as of writing:
- Debian 13 Trixie: fixed in APT version 3.0.4.
- Debian 12 Bookworm: fixed in APT version 2.6.2, released by the Debian LTS team.
- Debian testing and Sid: the fix arrives with APT 3.3.6, not yet available in the archive at the time of writing.
- Ubuntu 22.04 LTS and later: fixed in versions 2.4.15ubuntu0.1 (22.04), 2.8.4ubuntu0.1 (24.04), 3.2.1ubuntu0.1 (26.04) and 3.3.3ubuntu0.1 (26.10).
- Ubuntu 20.04 LTS and earlier versions: fixes are reserved for Ubuntu Pro subscribers.
- Derived distributions: Linux Mint, Raspberry Pi OS and Proxmox VE pull APT from Debian or Ubuntu repositories, and should therefore receive the fix through regular updates.
No active exploitation has been reported by Debian or Canonical.
How can you protect yourself?
To protect yourself from CVE-2026-109518, you must update APT. So yes, you need to patch APT... with APT. In addition, Canonical recommends disabling retries during the operation, which prevents the flaw from being exploited. That gives us the following full command:
sudo apt update && sudo apt upgrade -o Acquire::Retries=0Then check the installed version with the apt policy apt command. On a Debian 13 machine, I was able to pull in the APT 3.0.4 update:

Canonical also reminds users that using HTTPS protects against this attack, since it relies on manipulating HTTP traffic. Pointing your sources to official mirrors over HTTPS (for example https://deb.debian.org/debian) is therefore a good precaution. However, some community mirrors do not support HTTPS.


