Skip to content
Book a demo
All posts
News

APT flaw in Debian and Ubuntu lets package downloads be swapped for root code

A flaw in APT, the package manager for Debian and Ubuntu, lets an attacker who can modify package downloads substitute their own package, with the attacker's code then running as root. Debian, Ubuntu and APT's developers published advisories on November 4.

Published
Reading
3 min
By
Kairo

A flaw in APT, the package manager for Debian and Ubuntu, allows an attacker who can modify package downloads to swap a checked package for their own. The attacker's code then runs as root, according to advisories that Debian, Ubuntu, and APT's developers published on November 4. The issue is tracked as .

What happened

Three advisories landed on the same day, from Debian, from Ubuntu, and from APT's own developers. Debian has released fixed versions of APT for the flaw. Ubuntu rates the flaw as high priority, with a CVSS 4.0 score of 7.7.

Ubuntu also says that distributions built on Debian and Ubuntu are affected as well, without naming any. That widens the exposure well past the two named projects, to anything downstream that ships the same package manager.

None of the three advisory reports describe attacks exploiting the flaw or offer a workaround for systems that cannot update yet. In practice that means patching is the route forward, and there is no documented stopgap for hosts that are stuck on an older build.

How it was done

The published detail is narrow, so it is worth repeating only what the advisories say. An attacker needs the ability to modify package downloads. With that position, they can swap a checked package for one of their own.

The attacker's code then runs as root, according to advisories that Debian, Ubuntu, and APT's developers published on November 4.
The Hacker News

Nothing in the advisories sets out an exploitation chain beyond that, and nobody has been named as having used it.

What to check

The useful work here is inventory and patch coverage, then a look at how your builds and hosts fetch packages.

  1. Inventory every APT version you run

    Run apt-cache policy apt across servers, and pull the same data from your configuration management inventory. Include container base images, since those are often missed. Any host or image still on a pre-fix build is on your remediation list.

  2. Patch and confirm the fix landed

    Update package lists and upgrade APT itself, then re-run apt-cache policy apt and compare the installed version against the fixed version in your distribution's advisory. A host that reports the old version after a successful run usually means a pinned version or a stale mirror.

  3. Check your downstream distributions

    List any images or appliances built on Debian or Ubuntu, including vendor-supplied ones. Ask each vendor which APT build they ship and when a rebuild is available. A vendor who cannot answer is an open item, not a pass.

  4. Review how packages are fetched

    Grep /etc/apt/sources.list and /etc/apt/sources.list.d for entries using plain http, and check proxy and mirror configuration in /etc/apt/apt.conf.d. Anything that lets an intermediary touch package traffic deserves scrutiny.

  5. Audit your build pipelines

    Look at CI job definitions and Dockerfiles that call apt-get install, and check whether they run against an internal mirror you control. Builds that reach arbitrary external endpoints over untrusted networks are the ones to tighten first.

  6. Make the fix stick in base images

    Rebuild base images after patching and push them through your registry, then scan for older image tags still referenced in deployments. A deployment manifest pointing at a stale tag will quietly reintroduce the old package manager.

Keep reading

More from the team
that verifies every change.

All posts

See what your application allows before an attacker does.