XZ Utils backdoor (CVE-2024-3094): the supply-chain attack that was caught just in time

A backdoor was hidden in a compression library used by Linux SSH servers. It was found by chance before reaching most stable systems. What it teaches about trust in software.

Publicly disclosed: 29 March 2024

On 29 March 2024 a developer noticed that SSH logins on a test system were slightly slower than usual. Investigating, he discovered that versions 5.6.0 and 5.6.1 of XZ Utils — a compression library present on almost every Linux system — contained a carefully hidden backdoor. A contributor had spent years gaining the trust of the project before inserting it.

CVESeverityAffectedFixed in
CVE-2024-3094Critical, CVSS 10.0 (malicious code)xz / liblzma 5.6.0 and 5.6.1Downgrade to 5.4.x or update to 5.6.2 and later

Why it mattered

Through the way some distributions link the SSH server with system libraries, the backdoor could have allowed the attacker to run commands on servers via SSH. It reached mainly test and rolling releases (such as Debian testing, Fedora 40 beta, Arch); most stable server releases were not affected because it was found early.

What to do

  1. Check the installed version: xz --version. Versions 5.6.0 and 5.6.1 must be replaced.
  2. Use stable, supported distribution releases on production servers, not testing branches.
  3. Restrict SSH access to VPN or known addresses, and use key-based authentication.
  4. Keep an inventory of software and libraries (SBOM) and subscribe to your distribution's security notices.
  5. Prefer vendors and open-source projects with active maintainers and transparent processes.

Every piece of software is built on trust. Verify where you can, and limit what can reach your servers.

Sources: Openwall oss-security, CISA alert, NVD CVE-2024-3094.

Need help with this? Contact CySec for a free consultation.


All articles

Need help with this?

Our engineers can review your current setup and propose concrete improvements.