> ## Documentation Index
> Fetch the complete documentation index at: https://blog.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# APT vulnerability CVE-2026-109518: spoofed packages installed as root

> APT flaw CVE-2026-109518 on Debian and Ubuntu lets an on-path attacker install an unverified package as root. Exposure, fixed versions per release, mitigation.

*Published on November 15, 2026*

> [!WARNING]
>
> **CVE-2026-109518 — APT, the Debian and Ubuntu package manager.** An attacker on the network path, or a malicious mirror, can make APT install a package that failed signature verification. The package installs as root. Debian 12, Debian 13, and Ubuntu 22.04 and later are exposed in their default configuration. Update APT today, with download retries turned off while the fix installs.

## The bug in two sentences

When an HTTP redirect gives two different downloads the same URI, APT can merge them. A file-handling error when resuming an HTTP download then lets an attacker replace a package after it has been verified: the APT team describes already-verified hard links being overwritten with a payload of the attacker's choice.

A `.deb` package runs its scripts as root during installation. The flaw therefore leads to root code execution on the machine.

Requirements:

* the attacker can tamper with **HTTP** traffic between the machine and the archive server: a proxy, an intermediate network, or a malicious mirror;
* the machine **installs a package** during the attack;
* APT is set to **retry failed downloads** (`Acquire::Retries` other than 0). That has been the default since APT 2.3.2, which means Debian 12 (bookworm) and Ubuntu 22.04 LTS.

Ubuntu, which assigned the CVE, scores it 7.7 under CVSS 4.0 and gives it high priority. NVD carries the same score. The APT team calls it critical. Max Justicz found the flaw; Debian and Ubuntu shipped fixes on November 4, 2026.

> [!NOTE]
>
> The flaw is not in CISA's Known Exploited Vulnerabilities (KEV) catalog (November 13, 2026 version). It affects every tool built on APT: `apt`, `apt-get`, `aptitude`, and Ubuntu's graphical software centers. Snap packages are not affected.

## Sizing your exposure

The question to ask: **does your machine fetch packages over HTTP, with retries turned on?** That is the default on Debian 12, Debian 13, and Ubuntu 22.04 and later.

| Profile | Exposure | Action |
| - | - | - |
| Debian 12 or 13, Ubuntu 22.04 LTS or later, HTTP APT sources | **High** | Update APT today with `-o Acquire::Retries=0` |
| Same releases, every APT source on HTTPS | Low: HTTPS blocks an on-path attacker | Update APT |
| Debian or Ubuntu Docker container or image that installs packages | **High** on every `apt-get install` | Update APT first in the image, then rebuild |
| Debian 11 and older, Ubuntu 20.04 LTS and older | Not affected in the default configuration | Check that no file sets `Acquire::Retries` |
| RHEL, AlmaLinux, Rocky Linux | Not affected: these distributions do not use APT | None |

To find out whether your sources use HTTP:

```bash theme={null}
# APT sources declared over HTTP (.list and .sources formats)
grep -rn 'http://' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
```

On an older release, to find out whether a script turned retries on:

```bash theme={null}
# A non-zero Acquire::Retries line makes the machine exposed
grep -rn 'Retries' /etc/apt/apt.conf /etc/apt/apt.conf.d/ 2>/dev/null
```

## Updating APT per distribution

The fix is an update of the `apt` package.

Ubuntu recommends turning retries off **while the fix installs**: without retries, the flaw cannot be exploited, by an on-path attacker or by a malicious mirror. The update itself cannot be hijacked.

### Debian

| Release | Fixed `apt` package | Advisory |
| - | - | - |
| Debian 13 (trixie) | `3.0.4` | DSA-6607-1 |
| Debian 12 (bookworm) | `2.6.2` | DLA-4880-1 |
| Debian testing (forky) and unstable (sid) | `3.3.6` or later | — |

```bash theme={null}
# Debian: upgrade all packages, with retries off
sudo apt update && sudo apt upgrade -o Acquire::Retries=0

# Or only APT and the packages built from the same source
sudo apt update && sudo apt install -o Acquire::Retries=0 --only-upgrade '?source-package(^apt$)'
```

### Ubuntu

| Release | Fixed `apt` package |
| - | - |
| 26.10 | `3.3.3ubuntu0.1` |
| 26.04 LTS | `3.2.1ubuntu0.1` |
| 24.04 LTS | `2.8.4ubuntu0.1` |
| 22.04 LTS | `2.4.15ubuntu0.1` |
| 20.04 LTS | `2.0.12+esm1` (Ubuntu Pro) |
| 18.04 LTS | `1.6.19+esm1` (Ubuntu Pro) |
| 16.04 LTS | `1.2.36+esm1` (Ubuntu Pro, Legacy add-on) |
| 14.04 LTS | `1.0.1ubuntu2.24+esm4` (Ubuntu Pro, Legacy add-on) |

The fixes ship in notice USN-8996-1. These are the commands Ubuntu recommends:

```bash theme={null}
# Ubuntu: upgrade all packages, with retries off
sudo apt update && sudo apt upgrade -o Acquire::Retries=0

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

If you do not trust the network path to the archive, Ubuntu also suggests switching its sources to HTTPS before updating. The command only rewrites URLs of Ubuntu's `archive`, `security`, and `ports` servers:

```bash theme={null}
# Ubuntu: switch the official sources to HTTPS
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 that the sources answer over HTTPS, without errors
sudo apt update
```

Some community and country mirrors do not serve HTTPS: `apt update` reports it as an error.

### Docker containers

In a Debian or Ubuntu image, update APT before installing anything else, then rebuild the image:

```dockerfile theme={null}
# Update APT first, with retries off
RUN apt-get update \
 && apt-get install -y -o Acquire::Retries=0 --only-upgrade apt \
 && rm -rf /var/lib/apt/lists/*
```

```bash theme={null}
# Rebuild, pulling the latest base image
docker build --pull --no-cache -t <image> .
```

## Mitigation until you can patch

If you cannot update right away, turn retries off in APT's configuration. This is the mitigation posted on oss-security alongside the Debian advisory: with no retry, the flaw's precondition is gone.

```bash theme={null}
# Turn off download retries for every APT command
echo 'Acquire::Retries "0";' | sudo tee /etc/apt/apt.conf.d/99-cve-2026-109518
```

With this setting, APT no longer retries a failed download: run the command again by hand if a download is interrupted.

## Checking the mitigation

```bash theme={null}
# Installed APT version, to compare with your distribution's table
apt list --installed '?source-package(^apt$)'

# Mitigation in place: the output must contain Acquire::Retries "0";
apt-config dump | grep -i 'Acquire::Retries'
```

## Reverting the mitigation

Once the fixed `apt` package is installed, remove the file to restore the default retries:

```bash theme={null}
sudo rm /etc/apt/apt.conf.d/99-cve-2026-109518
```

## What next?

Archive signatures remain APT's main safeguard, and the fix restores them. To have future fixes install without waiting, turn on [automatic security updates on your VPS](https://blog.onetsolutions.net/en/automatic-security-updates-linux-vps.md). For another recent flaw, read [the Linux kernel TCP flaw (CVE-2026-98432)](https://blog.onetsolutions.net/en/linux-tcp-cve-2026-98432.md). For any technical question, open a ticket from your [OnetSolutions customer area](https://help.onetsolutions.net/console/support).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.