Attack Simulation & Response

Red TeamEnd-to-end simulation using real adversary tradecraft Blue TeamThreat hunting, monitoring and incident response Purple TeamGrow your offensive and defensive teams together Ransomware Response24/7 emergency response for encrypted systems

Security Testing

Penetration TestingFinding flaws in web, network and mobile applications Enterprise Penetration TestingRegulation-aligned testing for finance and large enterprises Vulnerability ScanningContinuous scanning, prioritised with CVSS
A free scoping call tailored to your organisation.
All services Get a quote

Forensic Threat Hunting

PotreX VestigeHidden threat scanning across disk, memory and forensic traces

Threat Intelligence

PotreX ArgosDark web and leak-focused threat intelligence

Penetration Testing

PotreX BallistaEnterprise penetration testing platform with finding management
Every product can be deployed on-premises or in the cloud.
All products Request a demo
Services
Products
Blog Contact Us Sign In
Home / Blog / CVE-2024-3094
Threat Research

The XZ Utils Backdoor: A Door Into sshd, Planted in the Supply Chain

Summary

CVE-2024-3094 is not a programming mistake. It is a backdoor deliberately planted by someone who spent years earning maintainer trust in the XZ Utils project. The malicious code never appeared in the source repository — it was hidden inside test fixtures shipped in the release tarballs.

During the build, that code was extracted into liblzma, and on systemd-linked sshd processes it hijacked the key verification path through the IFUNC mechanism. The result: whoever held the attacker's private key could bypass authentication entirely.

The backdoor was caught before it reached stable distributions, because one developer went looking for an unexplained few hundred milliseconds of latency in sshd logins.

Advisory details

CVECVE-2024-3094
ComponentXZ Utils / liblzma — malicious code added to release tarballs
ClassCWE-506 · Embedded malicious code (supply chain)
SeverityCRITICAL · CVSS 10.0
Affected versionsxz 5.6.0 and 5.6.1
Affected distributionsTesting and development channels only (Fedora Rawhide, Debian sid, openSUSE Tumbleweed and similar)
Prerequisitesystemd-enabled sshd linking against liblzma

Root cause: the repository is not the tarball

A project's git repository and its released tarball are not always identical. The attacker modified only build-to-host.m4, a file that exists in the archive, adding a build step that unpacked a malicious object from what looked like binary test data.

This is why “I reviewed the repository and it is clean” is not a sufficient control: trust has to be verifiable all the way down to the build artefact.

Version and binary checks

The first check is trivial — is the installed version in the affected range?

analyst@ubuntu: ~ –□✕
analyst@ubuntu:~$ xz --version && dpkg -l xz-utils | tail -n 1
xz (XZ Utils) 5.6.1
liblzma 5.6.1
ii  xz-utils  5.6.1-0.1  amd64  XZ-format compression utilities

#  5.6.0 / 5.6.1 = affected range

Figure 1 — Identifying the installed XZ Utils version

The second check looks for the known function signature of the backdoor inside the library itself. On repackaged builds with altered version strings this is the more reliable method.

analyst@ubuntu: ~ –□✕
analyst@ubuntu:~$ hexdump -ve '1/1 "%.2x"' /usr/lib/x86_64-linux-gnu/liblzma.so.5 | grep -c f30f1efa554889f5
1

#  1 = suspicious signature found (a clean system returns 0)
#  host moved to quarantine

Figure 2 — Searching liblzma for the known backdoor signature

The third check establishes whether sshd actually links against liblzma; without that link the backdoor has no trigger.

analyst@ubuntu: ~ –□✕
analyst@ubuntu:~$ ldd $(which sshd) | grep -i lzma
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f2a9c1a0000)

#  sshd links against liblzma — a triggerable configuration

Figure 3 — Confirming the sshd to liblzma dependency

Rollback and verification

The remediation is to downgrade to a clean version and then treat the host as potentially compromised.

analyst@ubuntu: ~ –□✕
analyst@ubuntu:~$ sudo apt install --allow-downgrades xz-utils=5.4.5-0.3 && sudo systemctl restart ssh && xz --version | head -n 1
Setting up xz-utils (5.4.5-0.3) ...
xz (XZ Utils) 5.4.5

#  rolled back to a safe version, sshd restarted

Figure 4 — Rolling back to a clean version

A patch is not enough

If the affected version ran on an internet-facing host, downgrading alone does not close the incident: authorised keys, new user accounts, scheduled tasks and outbound connections must be reviewed, and where possible the host should be rebuilt from a known-good image.

Conclusion

The XZ incident showed that in the open source ecosystem the most critical dependency is not code but human trust. On the enterprise side the controls are clear: pin versions in production images, aim for reproducible builds, generate an SBOM, and keep testing channels well away from production.

Sources

Test it in your own environment

We assess your distribution channels and build pipeline against supply chain attacks.

Call now · 0850 551 01 01 WhatsApp · Send a message Email · info@potrex.com