Quick answer
CVE-2024-3094 is a supply-chain backdoor hidden in the XZ Utils compression library, versions 5.6.0 and 5.6.1. Malicious code disguised as test data was built into liblzma and, on distributions that link sshd to libsystemd, could let an attacker holding a secret key run commands through sshd before login. A contributor identity spent years earning co-maintainer trust before planting it. Andres Freund disclosed it on 29 March 2024, after noticing slow SSH logins. Almost no stable distribution shipped it.
At a glance
critical severity- Identifier
- CVE-2024-3094
- Also known as
- XZ Utils backdoor
- Product
- XZ Utils / liblzma (upstream release tarballs)
- Affected
- xz 5.6.0; xz 5.6.1
- Fixed in
- Downgrade to 5.4.x (CISA recommends 5.4.6); distribution reverts to the 5.4 series; upstream 5.6.2 and later (clean releases from 29 May 2024)
- CVSS
- 10.0 (CVSS 3.1, NVD and Red Hat)
- Disclosed
- Known exploited (CISA KEV)
- Not listed
Caught before wide release. Affected mainly rolling and pre-release distributions; most stable releases were never exposed.
01What is CVE-2024-3094?
CVE-2024-3094 is not an ordinary coding bug. It is a deliberately planted backdoor in XZ Utils, the project behind the xz command and the liblzma compression library used across Linux. The bulk of the malicious code sat in the git repository disguised as binary test files; the trigger that extracted it was a modified build script present only in the release tarballs for versions 5.6.0 and 5.6.1, so building from the git history alone did not produce a backdoored library.
When liblzma was built as a Debian or RPM package on x86-64 with gcc and the GNU linker, the backdoor wove itself into the library. On distributions that patch OpenSSH to support systemd notification, sshd pulls in libsystemd, which depends on liblzma, so the compromised code ended up loaded inside the SSH daemon. There it hooked a cryptographic function so that a client presenting the attacker's secret key could run commands — effectively remote code execution, reachable before login.
02Which distributions shipped it?
The short version: almost no stable release. The backdoor was present in 5.6.0 and 5.6.1, which had mostly reached rolling-release and pre-release channels when it was caught. Stable Debian, released Ubuntu, and Red Hat Enterprise Linux were never affected.
| Distribution | Exposure | Clean/fixed version |
|---|---|---|
| Fedora Rawhide / Fedora 40 (pre-release) | Rawhide 5.6.0 or 5.6.1; Fedora 40 possibly 5.6.0 | Downgrade to 5.4.x builds; RHEL unaffected |
| Debian testing/unstable | 5.5.1alpha-0.1 to 5.6.1-1 | 5.6.1+really5.4.5-1 (DSA-5649-1) |
| openSUSE Tumbleweed / MicroOS | 7–28 March 2024 | Update to 20240328 or later, reboot |
| Kali Linux | 26–29 March 2024 (5.6.0-0.2) | Upgrade liblzma5 |
| Arch Linux | 5.6.0-1 and 5.6.1-1 present | 5.6.1-2; sshd not linked to liblzma |
| Debian stable, released Ubuntu, RHEL | Not affected | No action for xz itself |
03How the backdoor worked, conceptually
During the package build, an obfuscated script extracted machine code from a disguised test file and linked it into liblzma. At process start, before the process's relocation table (GOT) was remapped read-only, the code installed a hook into the dynamic linker and waited for a specific cryptographic routine in sshd to be resolved, then redirected it to attacker-controlled code.
The result was a key-gated remote path: only a client holding the matching private key could trigger it, which is why a passer-by could not simply exploit it. The backdoor also made SSH logins measurably slower — a stray half-second — which is precisely the anomaly that led to its discovery.
04How to check if you are affected
Check the installed liblzma / xz version. If it is in the 5.6.0–5.6.1 range on an affected distribution, treat the host as compromised rather than merely vulnerable, because a backdoor may have been used and a version downgrade alone does not prove the system is clean.
# Debian/Ubuntu/Kali: library and tool versions
apt-cache policy liblzma5 # look for an installed 5.6.0 / 5.6.1
dpkg-query -W -f='${Package} ${Version}\n' liblzma5 xz-utils
# Any distro: does sshd even link liblzma on this box?
ldd "$(command -v sshd)" | grep -E 'liblzma|libsystemd'
# RPM-based systems
rpm -q xz xz-libs
xz --version # 5.6.0 or 5.6.1 = backdoored release05How to remediate
The fix is to get off 5.6.0/5.6.1 and back onto the 5.4 series, which carries none of the malicious content. CISA's advice on 29 March 2024 was to downgrade to an uncompromised version such as XZ Utils 5.4.6 Stable, hunt for malicious activity, and report findings. Debian and openSUSE had already rolled back, and Arch had rebuilt the package from git rather than the tarball, on 28 March; the clean upstream 5.6.2 followed on 29 May 2024.
- Apply your distribution's xz / liblzma update, which reverts to 5.4.x content
- Reboot, or at minimum restart sshd and anything else linked to liblzma, so the clean library is actually loaded
- On any host that ran the backdoored version with SSH exposed, treat it as potentially compromised: rebuild rather than trust it, and rotate keys and credentials
- Audit container images and CI base images, where old backdoored layers can linger long after the host is fixed
06What a WAF can and cannot do
Nothing at the HTTP edge filters this. The malicious path is in the SSH daemon, keyed to a secret the attacker holds, and it does not traverse a web application firewall or a reverse proxy at all. There is no signature a WAF could match that would help, and any vendor claiming to "block CVE-2024-3094" at the web layer is overstating it.
The honest control set here is supply-chain discipline: pin and verify dependencies, prefer building from reviewed source over opaque release tarballs, watch for behavioural anomalies like the login slowdown that exposed this one, and keep management services such as SSH off the public internet — the same advice that limits regreSSHion — so a key-gated backdoor has no easy route in. Hiding your origin behind a proxy reduces exposure of the box; it does not touch the dependency itself.
07Timeline: a multi-year social-engineering campaign
The attack's real weapon was patience. An identity spent years building credibility before planting the code, exploiting an exhausted volunteer maintainer. CISA's follow-up, "Lessons from XZ Utils" (12 April 2024), argued that every technology manufacturer that profits from open source must be a responsible consumer of, and sustainable contributor to, the packages it depends on, rather than leaving critical libraries to lone volunteers. For defenders, the practical reading is to treat every dependency as a trust decision and to keep the exposed surface small — the same inventory discipline that preparing for a DDoS attack relies on.
| Date | Event |
|---|---|
| 29 Oct 2021 | The "Jia Tan" identity sends its first patch to the xz project |
| 2022 | Pressure from sock-puppet accounts pushes the burned-out maintainer to add a co-maintainer |
| 28 Oct 2022 | Jia Tan added to the Tukaani organisation on GitHub |
| 30 Dec 2022 | Jia Tan merges commits directly, showing commit access |
| 24 Feb 2024 | xz 5.6.0 released with the backdoored build script |
| 9 Mar 2024 | xz 5.6.1 released with a refined backdoor |
| 28 Mar 2024 | Andres Freund privately reports it to Debian and distros@openwall |
| 29 Mar 2024 | Public disclosure on oss-security; CISA issues its alert |
| 29 May 2024 | Clean upstream release XZ Utils 5.6.2 |
Questions
Frequently asked questions
Sources
Sources and verification
Version-inspection commands (apt-cache policy, dpkg-query, ldd, xz --version) run on Debian 12, October 2026; the rpm query is standard syntax but rpm was not available on the test host. No part of the backdoor is reproduced.
- 01NVD — CVE-2024-3094 · NVD
- 02backdoor in upstream xz/liblzma (original disclosure) · Andres Freund, oss-security
- 03XZ Utils backdoor (maintainer's page) · tukaani.org
- 04Reported Supply Chain Compromise Affecting XZ Utils (CVE-2024-3094) · CISA
- 05DSA-5649-1 xz-utils security update · Debian
- 06Urgent security alert for Fedora Linux 40 and Fedora Rawhide users · Red Hat
- 07CVE-2024-3094 (Ubuntu) · Canonical
- 08xz backdoor timeline · Russ Cox
- 09The xz package has been backdoored · Arch Linux
- 10openSUSE addresses supply chain attack against xz compression library · openSUSE
- 11All about the xz-utils backdoor · Kali Linux
- 12Lessons from XZ Utils: Achieving a More Sustainable Open Source Ecosystem · CISA
- 13XZ backdoor still lurking in Docker images · BleepingComputer
Last updated