CVE-2011-4089 in bzip2info

Summary

by MITRE

The bzexe command in bzip2 1.0.5 and earlier generates compressed executables that do not properly handle temporary files during extraction, which allows local users to execute arbitrary code by precreating a temporary directory.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 05/11/2026

The vulnerability identified as CVE-2011-4089 affects the bzexe command within bzip2 version 1.0.5 and earlier, presenting a significant security risk through improper temporary file handling during executable extraction processes. This flaw exists in the way the command manages temporary directories when decompressing files, creating opportunities for privilege escalation and arbitrary code execution. The issue stems from the command's failure to properly validate or secure temporary file locations, allowing malicious actors to exploit this weakness through careful pre-creation of directories.

The technical implementation of this vulnerability involves the bzexe command's reliance on temporary directories for storing intermediate files during compression and decompression operations. When the command extracts compressed executables, it creates temporary files in predictable locations without adequate security measures to prevent directory traversal or manipulation. Attackers can exploit this by creating symbolic links or pre-creating directories with specific names in locations where the command expects temporary files to be created, thereby redirecting execution flow to malicious code.

This vulnerability directly maps to CWE-352, which addresses Cross-Site Request Forgery, and CWE-22, which covers Improper Limitation of a Pathname to a Restricted Directory. The operational impact of CVE-2011-4089 extends beyond simple code execution, as it represents a privilege escalation vector that can be exploited by local users to gain elevated system access. The attack requires minimal privileges but can result in complete system compromise, making it particularly dangerous in multi-user environments where users might have access to bzip2 utilities.

From an attacker's perspective, the exploitation process involves creating a malicious temporary directory structure that will be used by the bzexe command during decompression. This attack aligns with ATT&CK technique T1059, which covers Command and Scripting Interpreter, and T1068, which addresses Exploitation for Privilege Escalation. The vulnerability can be leveraged in scenarios where users have write access to directories containing compressed executables, or when system administrators use the bzexe command with insufficient security controls.

Mitigation strategies for CVE-2011-4089 should focus on immediate software updates to bzip2 version 1.0.6 or later, which contain proper temporary file handling mechanisms. System administrators should implement restrictive permissions on directories containing compressed files and avoid using the bzexe command with elevated privileges. Additional protective measures include monitoring for suspicious directory creation patterns and implementing automated security scanning tools that can detect improper temporary file handling in system utilities. The vulnerability demonstrates the critical importance of secure temporary file management in system utilities and highlights the need for comprehensive input validation and proper privilege separation in security-critical applications.

Reservation

10/18/2011

Disclosure

04/16/2014

Moderation

accepted

Entry

VDB-69371

CPE

ready

Exploit

Download

EPSS

0.01045

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!