If you manage Ubuntu or Debian servers, your morning just got a lot busier. A newly disclosed vulnerability in APT (CVE-2026-109518) allows an on-path attacker to bypass package signature verification entirely and achieve root remote code execution.
The worst part? You’re probably vulnerable by default.
I spent my morning digging through the disclosures and reading the commit diffs. The mechanics of this flaw are frustratingly elegant. It’s not a memory corruption bug or a crypto failure in the signature algorithm. It’s a logic flaw in how APT handles file system hard links when a download fails and needs to retry.[1][4]
The Mechanics of the Bypass
When you run apt install or apt upgrade, the client reaches out to an archive server or mirror over HTTP. Since APT has historically relied on GPG signatures to verify the integrity of the downloaded .deb files, the transport layer itself (HTTP vs HTTPS) hasn’t been strictly required for integrity. The assumption has always been that even if a man-in-the-middle modifies the package in transit, the signature check will catch it before the payload executes.[1][2]
Max Justicz, who discovered the flaw, found a gap in that logic. If an on-path attacker (like a compromised mirror or a malicious proxy) can manipulate the HTTP traffic, they can force the APT client into a specific retry loop using HTTP redirects and temporary server errors.[2]
When the download retries, APT incorrectly reuses hard links. This allows the attacker to swap out a legitimately signed package that APT just verified with an attacker-controlled, unsigned package right before the installation phase.[2][4] APT proceeds to install the attacker’s payload, executing its pre-install or post-install scripts as root.[2]
Why You’re Probably Vulnerable
The vulnerability requires the APT client to have Acquire::Retries set to a non-zero value. If it’s set to 0, APT simply fails the download and the exploit path is closed.[1]
However, starting with Debian 12 (Bookworm) and Ubuntu 22.04 LTS (Jammy Jellyfish), the default value for Acquire::Retries is 3.[4] This means if you are running modern versions of these distributions out of the box, you are vulnerable. Older distributions like Ubuntu 20.04 are not affected by default, but it’s common practice for sysadmins and configuration management scripts to explicitly enable retries to handle flaky network connections.[1][2]
Ubuntu has rated this with a CVSS of 7.7 (High), but on platforms like Reddit’s r/cybersecurity, practitioners are reacting as if it’s a critical, drop-everything event.[3] An unauthenticated remote root exploit via the package manager is the kind of nightmare scenario that keeps infrastructure teams up at night.
What You Need to Do
Patches are already rolling out. Debian has released fixed versions (e.g., APT 2.6.2 for Bookworm), and Ubuntu has pushed updates across its supported releases, including 24.04 LTS (APT 2.8.4ubuntu0.1) and 22.04 LTS (APT 2.4.15ubuntu0.1).[2][4]
If you use Ubuntu’s unattended-upgrades, the fix should apply automatically within 24 hours.[1] For everyone else, you need to update manually.
If you cannot immediately install the patched APT version, there is a reliable mitigation: temporarily disable retries during your upgrade run.
You can do this by passing the configuration override directly to your apt command:
| |
Alternatively, if you are concerned about your network path to the archive servers, you can switch your sources.list to use HTTPS instead of HTTP. Exploiting this vulnerability requires the attacker to manipulate the HTTP stream; TLS prevents that manipulation.[1]
This is a stark reminder that defense in depth matters. Trusting the package signature alone allowed a filesystem logic bug to compromise the entire system. Update your servers, check your Ansible playbooks for custom retry settings, and consider making HTTPS the default for your repositories anyway.
Sources
[1] https://ubuntu.com/blog/apt-vulnerability-fixes-available [2] https://thehackernews.com/2026/11/debian-and-ubuntu-apt-flaw-lets-mitm.html [3] https://www.reddit.com/r/cybersecurity/comments/1xo63qk/cve2026109518_critical_apt_vulnerability_allows [4] https://ubuntu.com/security/CVE-2026-109518