138% more reported CVEs per day in 2026 than last year.New: always-on Fixboxes. Vulnerable dependencies, fixed and verified.
← All vulnerabilities

xz backdoor (CVE-2024-3094): the poisoned XZ Utils release and how to check whether your builds are affected

The xz backdoor, CVE-2024-3094, is malicious code that a co-maintainer of XZ Utils hid in the release tarballs of versions 5.6.0 and 5.6.1, published in February and March 2024. On x86-64 Linux distributions that built xz as a Debian or RPM package and linked their OpenSSH server to liblzma through libsystemd, it let the attacker take over sshd's key verification. It was found on 29 March 2024, before it reached the stable releases of the major distributions. Make sure nothing you run or ship contains xz or liblzma 5.6.0 or 5.6.1: upgrade to 5.6.2 or later, or take your distribution's fixed package, and rebuild images built from rolling distributions in early 2024.

It is the best-known software supply chain attack on open source because of how it got in: not through a stolen account or a typo in a package name, but through two years of contributions by someone the project came to trust, and through a release tarball whose contents did not match the Git repository. A build that compiled xz from the official tarball got the backdoor; a build from the Git tag did not.

What happened

DateEventSource
Before 2024A contributor using the name Jia Tan works on xz for about two years, then gets commit access and release manager rightsSam James's FAQ
1 February 2024Debian uploads xz-utils 5.5.1alpha-0.1, the first of its affected packagesDSA-5649-1
24 February 2024XZ Utils 5.6.0 releasedXZ Utils NEWS
9 March 2024XZ Utils 5.6.1 releasedXZ Utils NEWS
29 March 2024Andres Freund reports the backdoor to oss-security; Red Hat assigns CVE-2024-3094; Debian reverts to the 5.4.5 code; CISA advises downgrading to an uncompromised version such as 5.4.6oss-security, CISA
30 March 2024The project's contact address stops forwarding to Jia TanTukaani
29 May 2024XZ Utils 5.6.2 and 5.4.7 released; 5.6.2 "Remove[s] the backdoor (CVE-2024-3094)"XZ Utils NEWS

The project's lead maintainer, Lasse Collin, documents the cleanup on tukaani.org. The backdoored tarballs were "created and signed by Jia Tan", and xz-embedded and xz-java "never had malicious or suspicious content." The current release is 5.8.4, from 9 September 2026.

Who is affected

Systems and images that installed xz or liblzma 5.6.0 or 5.6.1. In practice that means rolling and pre-release distributions between February and March 2024:

  • Debian testing, unstable and experimental, with xz-utils from 5.5.1alpha-0.1 up to and including 5.6.1-1. Debian says no stable release was affected.
  • Fedora 40 beta and Fedora Rawhide. Red Hat's alert says Fedora 40 users "may have received version 5.6.0" and Rawhide users 5.6.0 or 5.6.1, and that "No versions of Red Hat Enterprise Linux (RHEL) are affected."
  • Anything you built from the upstream 5.6.0 or 5.6.1 tarballs, including source builds in Dockerfiles, embedded Linux builds and vendored copies.

For other rolling distributions, check their own advisories. The backdoor only activated on x86-64 Linux with glibc, built by gcc and the GNU linker as part of a Debian or RPM package build, so many builds of 5.6.0 and 5.6.1 carried the malicious files without the backdoor being compiled in. Treat every 5.6.0 and 5.6.1 as affected anyway: you can't easily tell from the version which builds took the trigger.

How it works

The backdoor was not a bug. It was planted in two places, so that neither looked suspicious on its own:

  • Test files in Git. Two binary files, tests/files/bad-3-corrupt_lzma2.xz and tests/files/good-large_compressed.lzma, were committed to the repository as test data. Andres Freund notes that "the files were not even used for any 'tests' in 5.6.0."
  • A build script only in the tarball. The release tarballs contained a modified m4/build-to-host.m4 that is "not in the upstream source of build-to-host," and that the Git repository doesn't use. During the build it extracted a prebuilt object file from the test files and linked it into liblzma.

At runtime, the modified liblzma hooked RSA_public_decrypt in sshd during a public key login. OpenSSH doesn't use liblzma itself, but Debian and several other distributions patch it to notify systemd, and libsystemd depends on liblzma. The code checked its environment first: it ran only when argv[0] was /usr/sbin/sshd, TERM was unset, LANG was set and no debugger was detected. Red Hat, as the CNA, classifies it as embedded malicious code (CWE-506) and scores it 10.0 under CVSS 3.1, as does NVD.

It was found by chance. Freund saw ssh logins on a Debian unstable machine take about half a second longer than before (0.807 seconds instead of 0.299 for a failed login) and valgrind errors in liblzma, and traced them back.

How to check whether you are affected

On a host or VM, ask xz and the package manager:

xz --version
dpkg -l xz-utils liblzma5 | grep '^ii'   # Debian, Ubuntu
rpm -q xz xz-libs                         # Fedora, RHEL

A version number alone can mislead on Debian: the fixed package is 5.6.1+really5.4.5-1, which contains the 5.4.5 code under a higher version number. Compare with your distribution's security tracker.

Whether sshd loads liblzma shows whether the backdoor's path existed on that machine:

ldd "$(command -v sshd)" | grep liblzma

In container images. Images built in February and March 2024 from debian:testing, debian:sid, fedora:40, fedora:rawhide or similar rolling bases, and images derived from them, can still carry liblzma 5.6.x. Ask each image:

for image in $(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -v '<none>'); do
  version=$(docker run --rm --entrypoint sh "$image" -c 'xz --version 2>/dev/null | head -1' 2>/dev/null)
  printf '%s\t%s\n' "${version:-no xz}" "$image"
done | grep -E '5\.6\.[01]'

Base images like these are often removed from a registry long after they stop being used. Check the images in your registry and the ones your customers run, not only the ones on your build machine.

In your repositories, look for builds that fetch xz from source:

git grep -nE 'xz-5\.6\.[01]|xz/releases/download/v5\.6\.[01]|tukaani\.org/xz/xz-5\.6\.[01]'

What today's scan can't tell you. Scanning today's images covers what you'd deploy today. It doesn't tell you which of your builds in early 2024 ran on a rolling base, or which release a customer still runs. For that you need a record of what each build contained. See are we affected? how to assess a new CVE across your builds.

How to fix it, and what to do if you can't patch yet

  1. Upgrade or downgrade away from 5.6.0 and 5.6.1. Upstream, 5.6.2 and later remove the backdoor, and 5.4.x was never affected. On a distribution, install its fixed package; on Debian testing or unstable that was 5.6.1+really5.4.5-1 or later.
  2. Rebuild images from a fixed base and redeploy them. A running container keeps its old liblzma until it is replaced.
  3. Rebuild anything you compiled from the 5.6.0 or 5.6.1 tarballs, including firmware and embedded images, from 5.6.2 or later.

There is no configuration that makes 5.6.0 or 5.6.1 safe. Freund reports that setting LD_BIND_NOT=1 appeared to stop the backdoor, but that is an observation from the analysis, not a mitigation to rely on.

Verify the fix

  1. No xz 5.6.0 or 5.6.1 remains on hosts, in running containers or in the images in your registry, by the commands above.
  2. Every workload runs the rebuilt image. Compare the image digest each container runs with the one you built.
  3. sshd restarted after the upgrade, so no process still holds the old library: grep -l 'liblzma.*(deleted)' /proc/*/maps 2>/dev/null lists processes that still map a replaced liblzma.

Check for compromise

No exploitation of CVE-2024-3094 has been publicly confirmed, and it is not in CISA's KEV catalog. The backdoor's path ran through sshd, so the systems to look at are those that ran an affected liblzma with sshd reachable from the network. If such a system ran with sshd exposed while it had 5.6.0 or 5.6.1, CISA advises to "hunt for any malicious activity": review authentication and process logs from the date the package was installed, and rebuild the host from a clean image rather than cleaning it in place. Rotate the host's SSH keys and any credentials stored on it.

Freund's report includes detect.sh, a script by Vegard Nossum that checks a liblzma for the backdoor's signature. The indicators that matter most are the versions themselves and the two test file names above.

What to tell your customers

If you ship Linux images, appliances or firmware, customers will ask whether your product contains the backdoor. Answer with versions and the build dates you checked:

We checked every release of [product] for XZ Utils 5.6.0 and 5.6.1 (CVE-2024-3094). [No release contains an affected version: [product] uses xz [version] from [distribution].] / [Releases [x to y], built between [date] and [date], contain liblzma [version]; release [z] removes it. Please upgrade to [z].] We will update this notice if our assessment changes.

For a first holding statement and templates for each outcome, see how to answer customers after a supply chain attack.

How CRACI helps

CRACI runs your GitHub Actions jobs and records what each job pulls in as it builds, including Debian and Ubuntu apt packages and the container images it pulls, and it keeps every past build with its SBOM. Known malicious releases with a published CVE, such as xz, CVE-2024-3094, are flagged like any other vulnerability, and policy gates can block builds that contain one. Build history shows which past builds contained it, so you know the period you were exposed, within your retention period (180 days by default).

This is advisory matching, not malware detection: a new malicious release is not flagged until an advisory exists. CRACI would not have found the xz backdoor before 29 March 2024. One more limit: xz preinstalled in a base image arrives inside the image, not as a package download, so CRACI records the image reference the job pulled. Search your builds for the image tags as well as for xz packages.

See which of your builds contained a vulnerable package

More on build records: build-time SBOMs, Docker image SBOMs and lockfiles and what they miss. Other incidents: all vulnerabilities.

Sources and updates

Primary sources:

Analysis:

Updates:

  • 2026-11-16: First published.

Frequently asked questions

What is the xz backdoor?

Malicious code hidden in the release tarballs of XZ Utils 5.6.0 and 5.6.1, published in February and March 2024 by a co-maintainer using the name Jia Tan. During a Debian or RPM package build on x86-64 Linux, it modified liblzma so that, in an sshd linked to liblzma through libsystemd, the backdoor could take over RSA key verification. It is tracked as CVE-2024-3094.

Which versions of xz are affected by CVE-2024-3094?

XZ Utils 5.6.0 and 5.6.1. Earlier versions are not affected, and 5.6.2, released on 29 May 2024, removed the backdoor. Distribution packages carry their own version numbers: Debian's affected packages ran from 5.5.1alpha-0.1 to 5.6.1-1 in testing, unstable and experimental.

Was the xz backdoor exploited?

No exploitation has been publicly confirmed. It was found on 29 March 2024, before the affected versions reached the stable releases of the major distributions, and CVE-2024-3094 is not in CISA's Known Exploited Vulnerabilities catalog. It still scores 10.0 under CVSS 3.1, from both Red Hat as the CNA and NVD.

Is my Ubuntu, Debian stable or RHEL system affected?

Not by the distribution's own packages. Debian says no stable release was affected, and Red Hat says no version of RHEL was affected; for Ubuntu and other distributions, check their own advisories. Fedora 40 beta and Rawhide and Debian testing, unstable and experimental did, so check machines and images built from those, and any xz you built from the upstream tarballs yourself.

How was the xz backdoor found?

Andres Freund noticed that ssh logins on a Debian unstable machine used more CPU than they should, about half a second extra, and that valgrind reported errors. He traced it to liblzma and reported it to the oss-security list on 29 March 2024.

Does CRACI detect the xz backdoor?

CRACI flags builds that contain xz 5.6.0 or 5.6.1, because the backdoor has a published CVE, and a policy gate can block those builds. This is advisory matching, not malware detection: CRACI would not have found the backdoor before the CVE was published.