Blog
Vulnerabilities and Threats

Is the XZ Utils CVE-2024-3094 as bad as we fear?

Benjamin Marr
Author
Benjamin Marr
Security Engineer

Key Points

TL;DR

  • The attack is believed to be a nation-state level attack, and only the rogue developer and groups with which the compromised key has been shared would be able to gain access. As such, CVE-2024-3094 is not likely to be widely exploited.
  • Check Linux systems that expose SSH to the internet for affected versions of 'xz-utils', downgrade the version and restart the 'sshd' service.
  • Remain vigilant of any further developments or other impacted services. This post will be updated if any such items appear.

What is xz-utils CVE-2024-3094?

Over the Easter weekend (29 March - 1 April 2024) a major vulnerability within 'xz-utils' was identified, the likes of which that hasn't been seen before. Unlike other vulnerabilities, this one appears to have been deliberately added by a maintainer of the project. This apparently reckless act has grabbed everyone's attention within the security community.

CVE-2024-3094 allows for an unauthenticated attacker to gain control over a server which has SSH exposed to the internet, which is as bad as a vulnerability can get. However, thankfully there is some good news - it was caught before it propagated throughout all major Linux distributions.

How did the xz-utils vulnerability (CVE-2024-3094) happen?

The more that people look at CVE-2024-3094 and the chain of events that lead up to its discovery, the more people are really understanding how sophisticated this attack is.

'xz-utils' is an open-source piece of software that is used for compression. It is utilized by many other applications and is considered trusted by the community. The application is fairly ubiquitous as it is included within almost all distributions of Linux.

The 'xz-utils' project has been maintained by a single developer over the years (with contributions from others). The maintainer at the center of this backdoor, Jia Tan (JiaT75), built up credibility over multiple years (since 2021), earning themselves a position as the project's second maintainer in 2022. Over time, the developer contributed to the project with meaningful updates and patches. However, some of these implementations are now thought by the community to be precursors that allowed for the insertion of the backdoor code into the project, by turning off key defenses.

In February of 2024, the developer added in the backdoor code which is at the heart of CVE-2024-3094. This backdoor file was heavily obfuscated and disguised as a testing file for the project, however it is now known that this file was never used in any unit tests within the project.

This sophisticated backdoor targets the interaction between an OpenSSH server and 'xz-utils', by hijacking the authentication step. The backdoor will only respond to a single private key which is currently only known by the attacker, and the backdoor also includes a killswitch that allows the attacker to turn the vulnerability off.

The saving grace for the internet as a whole came from Andres Freund who raised the alarm. He was able to spot this early and raise his concerns to the right people which prevented the mass-proliferation of what could've been one of the worst vulnerabilities to make it out into the world.

A more complete timeline can be found within the additional reading section at the bottom of this page.

What systems are at risk?

A number of conditions need to be met for a system to be vulnerable. At the time of writing this post, the following conditions must be met:

  • Have version '5.6.0-5.6.1' of xz-utils installed - note that this mostly affects unstable branches of the main Linux distributions that are used in a server capacity. You can check if your distribution is affected by examining the repology page for xz
  • Using a distribution of Linux that utilizes 'systemd'
  • Exposes a publicly accessible instance of 'sshd'

What do I need to do?

As it currently stands, we advise checking for installed versions of 'xz' and ensuring that they are not '5.6.0-5.6.1'. The recommendation is to downgrade the version of 'xz-utils' and restart the 'sshd' service if you are.

If you are not using these versions, then there is no further action to be taken at present. We recommend keeping an eye on developments as they happen, as such this post will be updated with any pertinent information.

Additional reading and research

Changelog

02/04/2024 1500hrs - Initial Post

Get our free

Ultimate Guide to Vulnerability Scanning

Learn everything you need to get started with vulnerability scanning and how to get the most out of your chosen product with our free PDF guide.

Sign up for your free 14-day trial

7 days free trial
Find out everything you need to know about the xz-utils vulnerability (CVE-2024-3094) and what you should do if your systems are at risk.
back to BLOG

Is the XZ Utils CVE-2024-3094 as bad as we fear?

Benjamin Marr

TL;DR

  • The attack is believed to be a nation-state level attack, and only the rogue developer and groups with which the compromised key has been shared would be able to gain access. As such, CVE-2024-3094 is not likely to be widely exploited.
  • Check Linux systems that expose SSH to the internet for affected versions of 'xz-utils', downgrade the version and restart the 'sshd' service.
  • Remain vigilant of any further developments or other impacted services. This post will be updated if any such items appear.

What is xz-utils CVE-2024-3094?

Over the Easter weekend (29 March - 1 April 2024) a major vulnerability within 'xz-utils' was identified, the likes of which that hasn't been seen before. Unlike other vulnerabilities, this one appears to have been deliberately added by a maintainer of the project. This apparently reckless act has grabbed everyone's attention within the security community.

CVE-2024-3094 allows for an unauthenticated attacker to gain control over a server which has SSH exposed to the internet, which is as bad as a vulnerability can get. However, thankfully there is some good news - it was caught before it propagated throughout all major Linux distributions.

How did the xz-utils vulnerability (CVE-2024-3094) happen?

The more that people look at CVE-2024-3094 and the chain of events that lead up to its discovery, the more people are really understanding how sophisticated this attack is.

'xz-utils' is an open-source piece of software that is used for compression. It is utilized by many other applications and is considered trusted by the community. The application is fairly ubiquitous as it is included within almost all distributions of Linux.

The 'xz-utils' project has been maintained by a single developer over the years (with contributions from others). The maintainer at the center of this backdoor, Jia Tan (JiaT75), built up credibility over multiple years (since 2021), earning themselves a position as the project's second maintainer in 2022. Over time, the developer contributed to the project with meaningful updates and patches. However, some of these implementations are now thought by the community to be precursors that allowed for the insertion of the backdoor code into the project, by turning off key defenses.

In February of 2024, the developer added in the backdoor code which is at the heart of CVE-2024-3094. This backdoor file was heavily obfuscated and disguised as a testing file for the project, however it is now known that this file was never used in any unit tests within the project.

This sophisticated backdoor targets the interaction between an OpenSSH server and 'xz-utils', by hijacking the authentication step. The backdoor will only respond to a single private key which is currently only known by the attacker, and the backdoor also includes a killswitch that allows the attacker to turn the vulnerability off.

The saving grace for the internet as a whole came from Andres Freund who raised the alarm. He was able to spot this early and raise his concerns to the right people which prevented the mass-proliferation of what could've been one of the worst vulnerabilities to make it out into the world.

A more complete timeline can be found within the additional reading section at the bottom of this page.

What systems are at risk?

A number of conditions need to be met for a system to be vulnerable. At the time of writing this post, the following conditions must be met:

  • Have version '5.6.0-5.6.1' of xz-utils installed - note that this mostly affects unstable branches of the main Linux distributions that are used in a server capacity. You can check if your distribution is affected by examining the repology page for xz
  • Using a distribution of Linux that utilizes 'systemd'
  • Exposes a publicly accessible instance of 'sshd'

What do I need to do?

As it currently stands, we advise checking for installed versions of 'xz' and ensuring that they are not '5.6.0-5.6.1'. The recommendation is to downgrade the version of 'xz-utils' and restart the 'sshd' service if you are.

If you are not using these versions, then there is no further action to be taken at present. We recommend keeping an eye on developments as they happen, as such this post will be updated with any pertinent information.

Additional reading and research

Changelog

02/04/2024 1500hrs - Initial Post

Release Date
Level of Ideal
Comments
Before CVE details are published
🥳
Limited public information is available about the vulnerability.

Red teamers, security researchers, detection engineers, threat actors have to actively research type of vulnerability, location in vulnerable software and build an associated exploit.

Tenable release checks for 47.43% of the CVEs they cover in this window, and Greenbone release 32.96%.
Day of CVE publish
😊
Vulnerability information is publicly accessible.

Red teamers, security researchers, detection engineers and threat actors now have access to some of the information they were previously having to hunt themselves, speeding up potential exploit creation.

Tenable release checks for 17.12% of the CVEs they cover in this window, and Greenbone release 17.69%.
First week since CVE publish
😐
Vulnerability information has been publicly available for up to 1 week.

The likelihood that exploitation in the wild is going to be happening is steadily increasing.

Tenable release checks for 10.9% of the CVEs they cover in this window, and Greenbone release 20.69%.
Between 1 week and 1 month since CVE publish
🥺
Vulnerability information has been publicly available for up to 1 month, and some very clever people have had time to craft an exploit.

We’re starting to lose some of the benefit of rapid, automated vulnerability detection.

Tenable release checks for 9.58% of the CVEs they cover in this window, and Greenbone release 12.43%.
After 1 month since CVE publish
😨
Information has been publicly available for more than 31 days.

Any detection released a month after the details are publicly available is decreasing in value for me.

Tenable release checks for 14.97% of the CVEs they cover over a month after the CVE details have been published, and Greenbone release 16.23%.

With this information in mind, I wanted to check what is the delay for both Tenable and Greenbone to release a detection for their scanners. The following section will focus on vulnerabilities which:

  • Have CVSSv2 rating of 10
  • Are exploitable over the network
  • Require no user interaction

These are the ones where an attacker can point their exploit code at your vulnerable system and gain unauthorised access.

We’ve seen previously that Tenable have remote checks for 643 critical vulnerabilities, and OpenVAS have remote checks for 450 critical vulnerabilities. Tenable release remote checks for critical vulnerabilities within 1 month of the details being made public 58.4% of the time, but Greenbone release their checks within 1 month 76.8% of the time. So, even though OpenVAS has fewer checks for those critical vulnerabilities, you are more likely to get them within 1 month of the details being made public. Let’s break that down further.

In Figure 10 we can see the absolute number of remote checks released on a given day after a CVE for a critical vulnerability has been published. What you can immediately see is that both Tenable and OpenVAS release the majority of their checks on or before the CVE details are made public; Tenable have released checks for 247 CVEs, and OpenVAS have released checks for 144 CVEs. Then since 2010 Tenable have remote released checks for 147 critical CVEs and OpenVAS 79 critical CVEs on the same day as the vulnerability details were published. The number of vulnerabilities then drops off across the first week and drops further after 1 week, as we would hope for in an efficient time-to-release scenario.

Figure 10: Absolute numbers of critical CVEs with a remote check release date from the date a CVE is published

While raw numbers are good, Tenable have a larger number of checks available so it could be unfair to go on raw numbers alone. It’s potentially more important to understand the likelihood that OpenVAS or Tenable will release a check of a vulnerability on any given day after a CVE for a critical vulnerability is released. In Figure 11 we can see that Tenable release 61% their checks on or before the date that a CVE is published, and OpenVAS release a shade under 50% of their checks on or before the day that a CVE is published.

Figure 11: Percentage chance of delay for critical vulnerabilities

So, since 2010 Tenable has more frequently released their checks before or on the same day as the CVE details have been published for critical vulnerabilities. While Tenable is leading at this point, Greenbone’s community feed still gets a considerable percentage of their checks out on or before day 0.

I thought I’d go another step further and try and see if I could identify any trend in each organisations release delay, are they getting better year-on-year or are their releases getting later? In Figure 12 I’ve taken the mean delay for critical vulnerabilities per year and plotted them. The mean as a metric is particularly influenced by outliers in a data set, so I expected some wackiness and limited the mean to only checks released 180 days prior to a CVE being published and 31 days after a CVE being published. These seem to me like reasonable limits, as anything greater than 6 months prior to CVE details being released is potentially a quirk of the check details and anything after a 1-month delay is less important for us.

What can we take away from Figure 12?

  • We can see that between 2011 and 2014 Greenbone’s release delay was better than that of Tenable, by between 5 and 10 days.
  • In 2015 things reverse and for 3 years Tenable is considerably ahead of Greenbone by a matter of weeks.
  • But, then in 2019 things get much closer and Greenbone seem to be releasing on average about a day earlier than Tenable.
  • For both the trendline over an 11-year period is very close, with Tenable marginally beating Greenbone.
  • We have yet to have any data for 2021 for OpenVAS checks for critical show-stopper CVEs.
Figure 12: Release delay year-on-year (lower is better)

With the larger number of checks, and still being able to release a greater percentage of their remote checks for critical vulnerabilities Tenable could win this category. However, the delay time from 2019 and 2020 going to OpenVAS, and the trend lines being so close, I am going to declare this one a tie. It’s a tie.

The takeaway from this is that both vendors are getting their checks out the majority of the time either before the CVE details are published or on the day the details are published. This is overwhelmingly positive for both scanning solutions. Over time both also appear to be releasing remote checks for critical vulnerabilities more quickly.

Written by

Benjamin Marr

Recommended articles

Ready to get started with your 14-day trial?
try for free