How to protect your Debian or Ubuntu server from CVE-2026-109518 (remote code execution in APT)

What is CVE-2026-109518?

CVE-2026-109518 is a vulnerability in APT, the Debian and Ubuntu package manager, that allows remote code execution (RCE) as root. It was disclosed on November 4, 2026, in advisories from Debian, Ubuntu and the APT project itself.

The flaw is in APT's HTTP backend, so it affects every APT-based tool (apt, apt-get, aptitude and graphical front ends). By combining an HTTP redirect with a transient error that makes APT retry the download, an attacker can get APT to install, as root, a .deb package that never passed signature verification.

The attacker must be able to tamper with the unencrypted HTTP traffic between your server and the repository (a man-in-the-middle on the network path, a proxy or a malicious mirror), and your server must be installing or upgrading packages at that moment. No account on the server is needed.

Severity: Canonical, which assigned the CVE, scored it CVSS 4.0 7.7 (High); Red Hat rates it Important. As of November 12, 2026, there is no known exploitation and no known public exploit: CISA's assessment in the CVE record lists exploitation as "none", and the CVE is not in the CISA KEV catalog.

In short: if you run Debian 12 or 13, or Ubuntu 22.04 or later, you are affected in the default configuration and should update apt. If your server runs AlmaLinux, Rocky Linux, RHEL or CloudLinux, the base system does not use APT; see the EPEL exception below.

Are you affected?

Exploitation depends on APT retrying downloads, that is, on Acquire::Retries being non-zero. The default has been 3 since APT 2.3.2, which means since Debian 12 and Ubuntu 22.04. On older releases you are only exposed if you set a non-zero value. With 0, the vulnerability cannot be exploited.

Distribution Fixed apt version
Debian 13 3.0.4
Debian 12 2.6.2
Ubuntu 26.10 3.3.3ubuntu0.1
Ubuntu 26.04 LTS 3.2.1ubuntu0.1
Ubuntu 24.04 LTS 2.8.4ubuntu0.1
Ubuntu 22.04 LTS 2.4.15ubuntu0.1

Debian 11, Ubuntu 20.04 and older releases are not exposed in the default configuration; if you enabled retries, check the status of your release in the Debian Security Tracker or on Ubuntu's CVE page (links under Sources).

  • Debian 12 and 13 get the fix from the security repository (on Debian 12, through Debian LTS). Keep it enabled: the base Debian 13 suite still has 3.0.3, which is vulnerable.
  • Proxmox VE and Proxmox Backup Server use Debian's apt (Proxmox VE 9 and PBS 4 on Debian 13; Proxmox VE 8 and PBS 3 on Debian 12): update apt as on any Debian host. The sample Debian repositories in the Proxmox documentation use http://.
  • Containers and virtual machines: every Debian or Ubuntu container, LXC guest or VM has its own copy of apt and needs its own update.
  • RHEL family: RHEL, AlmaLinux, Rocky Linux and CloudLinux use RPM and DNF, not APT. Exception: EPEL 9 and 10 (a community repository for these distributions) ship an affected version of apt; if you installed it from there, check its version.

Not affected: APT transport methods other than HTTP, such as FTP; software installed with snap, which uses a different package system.

How to check your server

These commands are read-only. First, the installed version of apt and apt-utils; compare it with your release in the table, including the suffix (for example 2.4.15ubuntu0.1). If it is older, update:

dpkg-query -W apt apt-utils

Next, whether Acquire::Retries is set explicitly:

apt-config dump | grep -i retries; grep -rIn 'Retries' /etc/apt/apt.conf /etc/apt/apt.conf.d/ 2>/dev/null

Empty output does not mean you are safe: on Debian 12, Ubuntu 22.04 and later the default of 3 applies. Only an explicit Acquire::Retries "0" disables retries, and even then you should update.

Finally, see which repositories use unencrypted http:// (the transport the attack needs):

grep -rhiE '^[[:space:]]*(deb|deb-src|uris:)' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null

Having every entry on https:// does not replace the update: according to Ubuntu, a malicious mirror can also exploit the flaw.

How to mitigate

Option Best for Durable?
A: upgrade only apt with retries off Everyone, especially production servers Yes, this is the fix
B: full upgrade with retries off If you already planned a maintenance window Yes, this is the fix
C: switch the Ubuntu archive to HTTPS Ubuntu, if you cannot rule out an attacker on the network Complement, does not replace the update
D: Acquire::Retries 0 in the configuration If you cannot update yet Temporary

Option A: upgrade only apt with retries disabled (recommended)

Ubuntu recommends upgrading all packages and, if that is not possible, this command. It upgrades only the packages built from the apt source package (apt, apt-utils, libapt-pkg and, on Debian 12, apt-transport-https) and disables retries for that run, so the flaw cannot be triggered while apt itself is being replaced. Debian has not published its own command, but the -o option is standard APT syntax and works the same way. If sudo is not installed, run it as root without it.

sudo apt update && sudo apt install -o Acquire::Retries=0 --only-upgrade '?source-package(^apt$)'

On Ubuntu, unattended-upgrades is enabled by default and applies security updates every 24 hours, so you may already have the patch; check anyway. Do not assume this on Debian.

Option B: full upgrade with retries disabled

This command upgrades every pending package, not just apt: it can include libraries such as libc6 or libssl3 and restart services. Review the list first with apt list --upgradable. Afterwards, plan a maintenance window to restart the services (or the server) that use upgraded libraries.

sudo apt update && sudo apt upgrade -o Acquire::Retries=0

Option C: use HTTPS for the Ubuntu archive

HTTPS protects against an attacker on the network path. Ubuntu recommends enabling it before updating if you cannot rule out that scenario, and updating anyway.

The following official Ubuntu command edits your APT source files in place without making a backup, so save a copy first with the first command. It only works for Ubuntu and only switches the archive, security and ports servers on ubuntu.com and regional mirrors such as us.archive.ubuntu.com; it leaves cloud mirrors such as eu-west-1.ec2.archive.ubuntu.com, other mirrors and PPAs untouched.

sudo cp -a /etc/apt /root/etc-apt-backup
sudo sed -Ei 's!http://((([a-z]+\.)?archive|security|ports)\.ubuntu\.com)!https://\1!' /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources

Check which entries are still on http://:

grep -rn 'http://' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null

Run sudo apt update and make sure there are no errors: some community mirrors do not support HTTPS, and minimal images need the ca-certificates package.

Option D: disable retries in the APT configuration (temporary workaround)

A third-party post to the oss-security list suggests adding Acquire::Retries 0; to apt.conf until you upgrade, and Ubuntu confirms that with the value set to 0 the vulnerability cannot be exploited. In exchange, APT stops retrying failed downloads. This is not a fix: update as soon as you can.

After mitigating

  1. Verify the installed version on the server and in every Debian or Ubuntu container or VM. Only the Installed line counts: a newer Candidate does not mean you are fixed.
    apt-cache policy apt
  2. If you used Option D, you can remove Acquire::Retries 0; once apt is updated: according to Ubuntu, once the client is updated a compromised mirror no longer poses a risk.
  3. As of November 12, 2026, neither Debian, Ubuntu nor the APT project has published indicators of compromise, restart requirements or credential rotation advice for this vulnerability.

Need help?

Open a ticket at soporte.telecu.cloud and reference: CVE-2026-109518.

Sources

Tags
How to protect your OpenSSH server from sshole (CVE-2026-123158)
How to protect your WordPress site from CVE-2026-119977 (RCE during core updates)