View all Worklets
Linux

Linux - Security - Detect and Mitigate CVE-2024-3094

This Worklet will check your Linux endpoints for the xz/liblzma package and determine if it is vulnerable to CVE-2024-3094, and mitigate if needed.

Worklet Details

Bash-based Linux – Security – Detect and Mitigate CVE-2024-3094 Worklet Automation Script

The Detect and Mitigate CVE-2024-3094 Worklet automation script addresses a critical vulnerability identified in the upstream xz/liblzma package that poses a significant security threat to Linux systems. This vulnerability, denoted as CVE-2024-3094, involves the insertion of a malicious backdoor into the xz package's distributed tarballs.

This exploit could potentially compromise SSH servers by allowing arbitrary code execution, posing a severe risk to Linux endpoints. The backdoor, discovered by Andres Freund, manipulates the Makefile of liblzma and remains deeply embedded in the xz package.

Why Use the Detect and Mitigate CVE-2024-3094 Worklet?

This Worklet automation script is essential for Linux environments facing the critical vulnerability outlined in CVE-2024-3094. By utilizing this Worklet, organizations can proactively detect if their systems are vulnerable to the malicious code injected into the xz compression library. 

This Bash-based Worklet offers a structured approach to mitigating the vulnerability by downgrading the affected xz-utils package to a secure version,  safeguarding systems against potential exploits that could bypass SSH authentication and lead to arbitrary code execution.

Components of the Detect and Mitigate CVE-2024-3094 Worklet

The components of this Worklet automation script include mechanisms to identify the presence of vulnerable xz packages on Linux distributions such as Fedora Rawhide, Fedora 41, Arch Linux, Kali Linux, and Debian (Unstable). It employs binary tests to determine if the xz, or xz-utils version matches the vulnerable releases, namely 5.6.0, and 5.6.1.

Upon detection of a vulnerable package, the Worklet initiates a remediation process by downgrading the xz package to a non-affected version compatible with major Linux distributions.

How does the Detect and Mitigate CVE-2024-3094 Worklet Automation Script Work?

This Worklet functions by first identifying the package manager used in the Linux system and locating the xz package path. Subsequently, it retrieves the xz version installed on the system and performs a binary test to check if the version corresponds to the vulnerable releases.

If a vulnerable version is detected, the Worklet triggers a remediation process that downgrades the xz package using the appropriate package manager, ensuring the system is protected against the backdoor vulnerability that could result in remote code execution.

What is the expected outcome when you use the Detect and Mitigate CVE-2024-3094 Worklet?

When this Worklet automation script is executed, the expected outcome is the successful identification and mitigation of the CVE-2024-3094 vulnerability in the xz package. By downgrading the xz package to a secure version, organizations can eliminate the risk of arbitrary code execution and bypassing SSH authentication posed by the backdoor vulnerability.

This Worklet helps to ensure the integrity and security of your Linux endpoints across various distributions, providing a reliable defense mechanism against potential exploits targeting the xz/liblzma compression library.

View in app

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets