Debian and Ubuntu Patch APT Swap Flaw
Debian and Ubuntu patched an APT flaw that could let intercepted HTTP package installs run untrusted code as root. Check your server package version.
Debian and Ubuntu have released APT security fixes for servers that install packages through affected HTTP repositories. If you manage one, check your APT version and install the security update. If your host manages the server, ask them to confirm the patch.
What went wrong?
APT is the tool that downloads and installs software packages on Debian and Ubuntu. A flaw tracked as CVE-2026-109518 can let an attacker interfere with a package download after APT checks it. The result could be an untrusted package running code with root, or full administrator, privileges. Debian’s November 4 advisory describes the problem; Ubuntu’s explanation covers the affected conditions and repairs.
This is not a flaw that lets anyone on the internet take over a website just by visiting it. An attacker would need to control the HTTP path to a package repository, or operate a malicious mirror. The server must also follow a redirect, retry a download and install a package. The attacker could then slip in a malicious package despite APT’s normal checks. The advisories describe a possible attack, not confirmed exploitation of every affected host. The CISA known-exploited catalog did not list this CVE when we checked on November 9.
Which servers need to check?
Debian’s security tracker lists fixed APT packages for Debian 12 (bookworm) at 2.6.2 and Debian 13 (trixie) at 3.0.4. Ubuntu lists fixes for 22.04 LTS at 2.4.15ubuntu0.1 and 24.04 LTS at 2.8.4ubuntu0.1. Other supported Ubuntu releases have their own fixed builds on Ubuntu’s CVE page. Compare the full distribution package version, not just the major APT number.
The attack needs a nonzero Acquire::Retries setting. Ubuntu says that is the default from 22.04 LTS onward; Debian’s tracker says it is the default from Debian 12. Older systems can still be affected if an operator enabled retries. HTTPS repository connections prevent the on-path HTTP attack, but updating APT is the lasting fix. The vendor says snap packages use a different installer and are not affected by this issue.
What should you do?
- Identify the operating system and owner. If you rent managed hosting, ask the host whether its Debian or Ubuntu servers run a fixed APT build. A WordPress or PHP update in a control panel does not patch the operating system’s APT package. Our earlier PHP patching guide explains why application versions and server packages are separate checks.
- Back up and check the installed package. An administrator can check the distro release, APT package version, configured repositories and
Acquire::Retries. Compare the installed version against the vendor’s advisory for that exact release. On Ubuntu, the vendor recommendsapt list --installed '?source-package(^apt$)'. - Apply the distribution security update. Use trusted, supported repositories. Ubuntu recommends setting retries to zero while installing the security update, for example
sudo apt update && sudo apt upgrade -o Acquire::Retries=0. Follow your distribution’s guidance and maintenance window; do not assume Ubuntu’s command is a universal recipe for every control-panel host. HTTPS mirrors offer additional protection if available. Unsupported releases may need a supported upgrade or, for some older Ubuntu releases, eligible Ubuntu Pro security coverage. - Confirm the result. Recheck the installed APT package against the Debian or Ubuntu fixed build, ensure the update completed without repository errors, and test hosted sites and services after maintenance. Review unexpected package installs and repository changes if you suspect interception. For more background on checking services after a server patch, see our NGINX update checklist.
There is no need to treat every Debian or Ubuntu website as compromised. The risk is serious because a successful package install runs with broad privileges, but the attacker needs the specific network and download conditions above. Patch the installer, then keep your normal package-update routine.
Image credit: Lukas / Unsplash. Illustrative Linux terminal photo, not a capture of this flaw.


