1 April 2024

Backdoor in XZ Utils can lead to SSH server compromise


Backdoor in XZ Utils can lead to SSH server compromise

Malicious code in the widely used compression library across various Linux distributions XZ Utils has been uncovered that can lead to system compromise.

XZ Utils, a versatile command line tool, integrates compression and decompression functionalities for XZ files and liblzma, a zlib-like API for data compression, including support for the legacy .lzma format.

The security issue, which has been assigned an identifier of CVE-2024-3094, has been discovered by a PostgreSQL developer named Andres Freund, who noticed suspicious behavior related to liblzma, part of the xz package, on Debian sid installations, namely an uptick in CPU usage by the SSH daemon, causing delays in SSH performance and login times.

The malicious code was found in versions 5.6.0 and 5.6.1 of XZ Utils. The backdoor is not present in the source code found in the Git repository but is introduced in the distributed tarballs.

As of now, the following Linus distros are confirmed to have been affected: Fedora (40 Beta and Rawhide), Debian (Sid), openSUSE (Tumbleweed and MicroOS), Kali Linux (Rolling), Gentoo, and Arch Linux (Rolling). The macOS Homebrew package manager and the OpenWRT router firmware are also said to have been impacted. Fedora 40 Linux does not appear to be affected.

Interestingly, the backdoor was not directly embedded in the visible source code of liblzma or within XZ Utils itself. Instead, it was hidden within binary test files formatted in XZ compression, ostensibly a benign component of the library’s test suite.

“That line is *not* in the upstream source of build-to-host, nor is build-to-host used by xz in git. However, it is present in the tarballs released upstream, except for the "source code" links,” Freund wrote.

According to Red Hat, the malicious code alters functions within liblzma. Once activated, this modified code can be exploited by any software linked to the XZ library, potentially enabling the interception and modification of data processed through the library. In a specific case highlighted by Freund, exploitation of this backdoor under specific conditions could compromise SSHD authentication, granting unauthorized access to vulnerable systems.

As for how the malicious code was introduced to XZ Utils, the individual believed to be behind this operation, who goes online as Jia Tan or JiaT75, reportedly contributed code to the oss-fuzz project. It appears that JiaT75 has been targeting XZ since April 2022.

Following the disclosure, the US Cybersecurity and Infrastructure Security Agency (CISA) released a security advisory regarding CVE-2024-3094, advising users to downgrade XZ Utils to an uncompromised version, such as XZ Utils 5.4.6 Stable.


Back to the list

Latest Posts

Threat actors abusing Foxit PDF Reader flaw to deploy multiple malware variants

Threat actors abusing Foxit PDF Reader flaw to deploy multiple malware variants

The flaw involves Foxit PDF Reader's handling of pop-up messages.
20 May 2024
China-linked APT group uses malware to spy on commercial shipping

China-linked APT group uses malware to spy on commercial shipping

Mustang Panda infiltrated the computer systems of cargo shipping companies in Norway, Greece, and the Netherlands.
20 May 2024
The Grandoreiro malware is back up and running after January disruption

The Grandoreiro malware is back up and running after January disruption

Grandoreiro now targets over 1,500 banks worldwide, spanning more than 60 countries across Central and South America, Africa, Europe, and the Indo-Pacific region.
20 May 2024