bzip2 file decompression race condition could create world readable files

bzip2-decompression-race-condition (9127) The risk level is classified as MediumMedium Risk


bzip2 is vulnerable to a race condition that occurs between creating a new file and setting the files permissions, which could cause a file to be created with world readable permissions. This could allow a local attacker to access these files and potentially gain sensitive information.


Obtain Information


Upgrade to the latest version of bzip2 (1.0.2 or later), available from the bzip2 Web page. See References.

For FreeBSD:
Apply the patch for this vulnerability, as listed in FreeBSD Security Advisory FreeBSD-SA-02:25. See References.

For CalderaOpenLinux Server and Workstation 3.1 and 3.1.1:
Upgrade to the latest bzip2 package (1.0.0-7MR or later) as listed in SCO Security Advisory CSSA-2002-039.0. See References.

For other distributions:
Contact your vendor for upgrade or patch information.


  • bzip2 Web site: The bzip2 and libbzip2 official home page.
  • FreeBSD Security Advisory FreeBSD-SA-02:25: bzip2 contains multiple security vulnerabilities.
  • SCO Security Advisory CSSA-2002-039.0: Linux: bzip2 file creation and symbolic link vulnerabilities.
  • BID-4775: bzip2 Insecure Decompressed File Permissions Vulnerability
  • CVE-2002-0760: Race condition in bzip2 before 1.0.2 in FreeBSD 4.5 and earlier, OpenLinux 3.1 and 3.1.1, and possibly other operating systems, decompresses files with world-readable permissions before setting the permissions to what is specified in the bzip2 archive, which could allow local users to read the files as they are being decompressed.
  • OSVDB ID: 5116: bzip2 File Decompress Permission Arbitrary File Access

Platforms Affected:

  • FreeBSD FreeBSD 4.4
  • FreeBSD FreeBSD 4.5
  • Julian Seward bzip2 1.0.1 and prior
  • SCO Caldera OpenLinux Server 3.1
  • SCO Caldera OpenLinux Server 3.1.1
  • SCO Caldera OpenLinux Workstation 3.1
  • SCO Caldera OpenLinux Workstation 3.1.1


May 20, 2002

The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (IBM Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

For corrections or additions please email ignore thisxforceignore this@ignore thisus.ignore thisibm.comignore this

Return to the main page