TL;DR: APT downloads and installs software on Debian and Ubuntu. In unpatched versions, an attacker who controls package-download responses can replace a checked package when retries are enabled. Disable retries while installing the fix, then check the APT version in each environment that installs packages.
The command that installs the patch still uses the vulnerable APT already on the machine. Our automated builds need that first download protected too.
Attack of the week: the file changes after the check
Salvatore Bonaccorso’s November 4 Debian advisory describes CVE-2026-109518, discovered by Max Justicz. An HTTP redirect can cause APT to merge 2 different package downloads under the same URL.
APT checks a downloaded package’s checksum, a fingerprint of its bytes, against records protected by the repository’s digital signature. Here, 2 queued downloads share a file. When a failed download is retried, the resumed transfer can replace that file after verification. Installation then uses the changed bytes.
Debian calls the result “execution of arbitrary code as root.” The substituted package supplies installation scripts that run with administrator privileges in the environment running APT.

The resumed download changes the bytes that installation will use.
Luci Stanescu’s November 4 Ubuntu explanation identifies the conditions: a package install, an attacker who can manipulate responses, and a nonzero Acquire::Retries setting. Retries are enabled by default from Ubuntu 22.04 and, as Debian’s tracker confirms, Debian 12. Older releases can become exposed when configuration or a script turns retries on.
A package mirror is a server that supplies the downloads. HTTPS protects the connection against an attacker along the network path. A malicious mirror can still supply hostile responses over its own valid HTTPS connection, so the client needs the patch.
Protect the upgrade itself
Canonical recommends upgrading all packages with Acquire::Retries=0 for that operation. When a full upgrade isn't possible, its Ubuntu command targets the affected APT packages:
sudo apt update &&
sudo apt install -o Acquire::Retries=0 --only-upgrade '?source-package(^apt$)'The quoted selector matches packages built from APT’s source code, including its shared libraries. --only-upgrade limits the operation to installed packages, and the retry override protects this installation. A failed download may now stop the operation; investigate and retry deliberately while keeping retries disabled until the fix is present.
After the upgrade, list the installed APT packages:
apt list --installed '?source-package(^apt$)'Compare those versions with the advisory for the system’s release. Debian’s tracker lists 2.6.2 for Debian 12 and 3.0.4 for Debian 13.
Ubuntu’s security notice lists 2.4.15ubuntu0.1 for 22.04, 2.8.4ubuntu0.1 for 24.04, 3.2.1ubuntu0.1 for 26.04 and 3.3.3ubuntu0.1 for 26.10. Older releases have their own fixed builds and support requirements.
The APT advisories reviewed on November 8 don't report exploitation in the wild.

Check the client inside each environment that installs packages.
Ship this week
For a self-hosted runner, patch the machine that executes our automated build. For a managed runner recreated for each job, put the protected upgrade before the job’s other package installs. Every build stage that runs APT needs the fix too: a fixed runner can still build from an old Ubuntu image with its own vulnerable package manager.
In each build stage that runs APT, put the protected upgrade before the stage’s other package installs, then rebuild affected images. Record the Linux release and installed APT package versions in each runner and build stage that installs packages. Compare each with its distribution advisory. Check the final image too if it contains APT.
Check which servers supply the packages and where scripts change the retry setting. Unexpected mirrors need investigation. An HTTP connection by itself doesn't establish exploitation, and a missing explicit retry setting doesn't establish that retries are disabled.
Defender’s corner: restart SSH after patching Alpine
On affected Alpine Linux servers, OpenSSH can accept a password for an account that has none. OpenSSH handles remote logins.
Özgün Kültekin’s research describes *sshole, CVE-2026-123158, fixed in the November 5 OpenSSH release. GreyNoise’s November 8 update reports successful exploitation of its own vulnerable systems, with commands executed after login, beginning November 7.
Alpine’s openssh-server skips PAM’s additional authentication checks. The openssh-server-pam package is also affected when UsePAM no switches those checks off.
All of these conditions must also hold:
SSH accepts password logins.
The target account’s stored password field is
*.Another local account has a stored password hash beginning with
$5$or$6$.
OpenSSH borrows that other account’s hash settings to check the attempted password. On this path, a password longer than 256 bytes makes musl, Alpine’s system C library, return * as an error. It matches the target account’s stored field, so the login succeeds.
Alpine’s advisory excludes containers without an SSH server and cloud-init images that disable password authentication. On affected tiny-cloud VM images, setting a console password can add the required hash and expose the key-only alpine account.
Do this week: install the fixed package for the Alpine release, then run rc-service sshd restart as root. The old daemon keeps running until we restart it.
Alpine’s backported fixes include 10.3_p1-r2 for 3.24 and 10.0_p1-r11 for 3.22. An upstream version number alone doesn't establish whether a distribution has applied the fix.
If patching must wait, verify that key login works and keep the current session open. Follow Alpine’s workaround to set PasswordAuthentication no in the active configuration, including account-specific Match rules.
Run sshd -t && rc-service sshd restart as root. Confirm sshd -T | grep -i passwordauthentication prints passwordauthentication no, then check the effective setting for any account-specific rules too. Test a new key login before closing the retained session.
Investigate Accepted password for entries in /var/log/messages for accounts that shouldn't accept passwords. On an exposed host, if we can't rule out an unauthorized login, follow Alpine’s advice and treat it as compromised.
Agent bench: map the places that still install packages
Use a coding agent to inventory package-install steps. Start in a clean environment with automatic editor tasks, agent startup commands and repository-defined tool servers disabled. Give it read-only access to a checked revision of the Dockerfiles, runner-image definitions and CI workflows.
Ask for a table with the build stage or job, base image, each APT install command and any retry override. Require file:line evidence. Have it trace referenced scripts and reusable workflows, marking inaccessible definitions as unknown.
For each environment that runs APT, record its Linux release, APT version and exact image from a fresh build. Treat the agent’s static list as a starting point. It can miss generated commands, and a base-image tag alone doesn't prove which APT build ran.
Try it this week: compare the agent’s table with 1 completed build log. Add any missed install steps, then repeat across the remaining build environments.
Until next Tuesday,
R.K.
// end of issue 029
Sponsored content may appear below. Not part of Weekly Recon editorial.
You know the problem. Now build the fix.
You've spent years close to a broken industry or process. You know exactly what would fix it. But you’ve never had the time or resources to make it happen.
With Lovable, your expertise is all you need. Describe the solution to your problem — a website, a dashboard, an internal tool — and get professional-grade software back. You make every call on how it works, because you're the one who knows what it needs to do.
Start today and take $5 off your first month.
Discount of $5 applies to first month of any paid plan. You need to sign up via this webpage in order to claim the discount. The discount applies to new and returning users without an active paid plan. Terms apply.


