The xz backdoor: the attack that waited two years
A maintainer of more than two years nearly shipped a remote backdoor into SSH on major Linux distributions, caught because logins got half a second slower. The timeline, the mechanism, and what to check on your servers.
A long game
xz was maintained, for most of its life, by one volunteer. The attack began with help: small, useful patches. Then, as Jia Tan's patches waited for review, other accounts appeared on the mailing list complaining that the project moved too slowly and should take on a new maintainer.
- 29 Oct 2021“Jia Tan” sends a first, harmless patch to the xz-devel mailing list.
- Apr–Jun 2022An account called “Jigar Kumar” sends five emails pressing the maintainer, Lasse Collin, to hand over the project. Collin writes that Jia Tan “might have a bigger role in the future”.
- 28 Oct 2022Jia Tan is added to the project's GitHub organisation.
- 18 Mar 2023Jia Tan tags and builds a release (v5.4.2) for the first time.
- 23 Feb 2024Binary “test files” containing the hidden payload are committed to the repository.
- 24 Feb 2024xz 5.6.0 is released. Debian's unstable branch picks it up two days later.
- 9 Mar 2024xz 5.6.1 follows, fixing side effects that might have drawn attention.
- 28–29 Mar 2024Andres Freund reports the backdoor privately to distributions, then publicly on oss-security. It becomes CVE-2024-3094, scored 10.0.
How it hid
- Not in the code anyone reads. The payload sat in two compressed “test” files. A modified build script (present only in the release tarballs, not in git) extracted it during the build.
- Only where it mattered. It injected itself only into x86-64 Linux builds made with gcc as Debian or RPM packages, and only switched on inside
/usr/sbin/sshd. - Through a side door. OpenSSH does not use xz. But several distributions patch sshd to talk to systemd, and systemd loads liblzma, so the library ended up inside the SSH server anyway.
- Before the login. The backdoor redirected
RSA_public_decrypt, a function sshd calls while checking a key: before authentication completes. Whoever held the attackers' Ed448 private key could run commands on the machine.
Caught by half a second
Freund was chasing a performance regression on Debian's development branch when sshd started using surprisingly much CPU and valgrind began reporting errors. The difference was small enough to ignore:
| Item | Seconds |
|---|---|
| Before the backdoored liblzma | 0.299 s |
| After | 0.807 s |
Source: Andres Freund, oss-security (29 Mar 2024), measuring `ssh nonexistant@localhost`.
- From the first harmless patch to public disclosure
- 2 yr 5 moRuss Cox, xz timeline
- CVSS score of CVE-2024-3094: the maximum
- 10.0Red Hat / NVD
- Release versions that carried the backdoor: 5.6.0 and 5.6.1
- 2Andres Freund, oss-security
Our reading
Analysis: Altumptic's interpretation of the reporting above.
- The attack surface was a person. No exploit was needed to get commit rights, only patience, useful work and a tired maintainer under public pressure.
- What is reviewed is not what is shipped. Everyone reads the repository; almost no one diffs a release tarball against it. That gap was the whole hiding place.
- Distribution patches create invisible dependencies. The path from sshd to liblzma existed only because of a convenience patch downstream.
- Performance is a security signal. The detection was luck plus curiosity. A baseline of how long logins take, and which libraries sshd loads, turns that luck into a process.
For a lab whose monitoring tool, ALT-02 LemonSees, treats the SSH session as the agent, this case is close to home: that session is only as trustworthy as the sshd binary and every library it loads.
What to check on your servers
- Confirm no host, image or container runs xz 5.6.0 or 5.6.1: old Debian images on Docker Hub still contained it in 2025.
- Record which libraries sshd loads (
ldd /usr/sbin/sshd) and alert when that list or those files change. - Keep production on stable distribution channels; the exposed systems ran testing, unstable or rolling releases.
- Treat unexplained CPU or latency in sshd as a security event, not just a performance one.
- Where you build from source, build from the repository, or compare release tarballs against it before trusting them.
Evidence and sources
- Andres Freund: backdoor in upstream xz/liblzma leading to ssh server compromise, oss-security (29 Mar 2024)
- Russ Cox: Timeline of the xz open source attack
- CISA: Reported supply chain compromise affecting XZ Utils, CVE-2024-3094 (29 Mar 2024)
- Wikipedia: XZ Utils backdoor
Altumptic has no involvement in these incidents and no non-public information about them. Figures are as reported by the sources above on the dates given.
Corrections
No corrections since publication on 15 Oct 2026. If something here is wrong, write to the lab through the security page; a correction will say what changed and when.
Cite this entry
Altumptic Lab (2026). ALT-09: The xz backdoor: the attack that waited two years. 15 Oct 2026. altumptic.com/research/xz-backdoor-two-years