PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

BID:32625

Info

PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

Bugtraq ID: 32625
Class: Input Validation Error
CVE: CVE-2008-5658
Remote: Yes
Local: No
Published: Dec 04 2008 12:00AM
Updated: May 07 2015 05:01PM
Credit: Stefan Esser
Vulnerable: Ubuntu Ubuntu Linux 8.10 sparc
Ubuntu Ubuntu Linux 8.10 powerpc
Ubuntu Ubuntu Linux 8.10 lpia
Ubuntu Ubuntu Linux 8.10 i386
Ubuntu Ubuntu Linux 8.10 amd64
Ubuntu Ubuntu Linux 8.04 LTS sparc
Ubuntu Ubuntu Linux 8.04 LTS powerpc
Ubuntu Ubuntu Linux 8.04 LTS lpia
Ubuntu Ubuntu Linux 8.04 LTS i386
Ubuntu Ubuntu Linux 8.04 LTS amd64
Ubuntu Ubuntu Linux 7.10 sparc
Ubuntu Ubuntu Linux 7.10 powerpc
Ubuntu Ubuntu Linux 7.10 lpia
Ubuntu Ubuntu Linux 7.10 i386
Ubuntu Ubuntu Linux 7.10 amd64
Ubuntu Ubuntu Linux 6.06 LTS sparc
Ubuntu Ubuntu Linux 6.06 LTS powerpc
Ubuntu Ubuntu Linux 6.06 LTS i386
Ubuntu Ubuntu Linux 6.06 LTS amd64
Turbolinux Turbolinux Server 10.0
Turbolinux Turbolinux Server 11 x64
Turbolinux Turbolinux Server 11
Turbolinux Turbolinux Server 10.0.0 x64
Turbolinux Client 2008
Turbolinux Appliance Server Workgroup Edition 1.0
Turbolinux Appliance Server Hosting Edition 1.0
Turbolinux Appliance Server 1.0 Workgroup Edition
Turbolinux Appliance Server 1.0 Hosting Edition
Turbolinux Appliance Server 3.0 x64
Turbolinux Appliance Server 3.0
Turbolinux Appliance Server 2.0
SuSE SUSE Linux Enterprise Server 10 SP2
S.u.S.E. openSUSE 11.1
S.u.S.E. openSUSE 11.0
S.u.S.E. openSUSE 10.3
rPath rPath Linux 2
rPath rPath Linux 1
rPath Appliance Platform Linux Service 2
rPath Appliance Platform Linux Service 1
Redhat Application Stack v2 0
PHP PHP 5.2.6
PHP PHP 5.2.5
PHP PHP 5.2.4
PHP PHP 5.2.3
PHP PHP 5.2.2
PHP PHP 5.2.1
+ Ubuntu Ubuntu Linux 7.04 sparc
+ Ubuntu Ubuntu Linux 7.04 powerpc
+ Ubuntu Ubuntu Linux 7.04 i386
+ Ubuntu Ubuntu Linux 7.04 amd64
PHP PHP 5.2
+ Debian Linux 4.0 sparc
+ Debian Linux 4.0 s/390
+ Debian Linux 4.0 powerpc
+ Debian Linux 4.0 mipsel
+ Debian Linux 4.0 mips
+ Debian Linux 4.0 m68k
+ Debian Linux 4.0 ia-64
+ Debian Linux 4.0 ia-32
+ Debian Linux 4.0 hppa
+ Debian Linux 4.0 arm
+ Debian Linux 4.0 amd64
+ Debian Linux 4.0 alpha
+ Debian Linux 4.0
Mandriva Linux Mandrake 2009.0 x86_64
Mandriva Linux Mandrake 2009.0
Mandriva Linux Mandrake 2008.1 x86_64
Mandriva Linux Mandrake 2008.1
Mandriva Linux Mandrake 2008.0 x86_64
Mandriva Linux Mandrake 2008.0
MandrakeSoft Corporate Server 4.0 x86_64
MandrakeSoft Corporate Server 4.0
HP HP-UX B.11.31
HP HP-UX B.11.23
HP HP-UX B.11.11
Gentoo Linux
Debian Linux 5.0 sparc
Debian Linux 5.0 s/390
Debian Linux 5.0 powerpc
Debian Linux 5.0 mipsel
Debian Linux 5.0 mips
Debian Linux 5.0 m68k
Debian Linux 5.0 ia-64
Debian Linux 5.0 ia-32
Debian Linux 5.0 hppa
Debian Linux 5.0 armel
Debian Linux 5.0 arm
Debian Linux 5.0 amd64
Debian Linux 5.0 alpha
Debian Linux 5.0
Debian Linux 4.0 sparc
Debian Linux 4.0 s/390
Debian Linux 4.0 powerpc
Debian Linux 4.0 mipsel
Debian Linux 4.0 mips
Debian Linux 4.0 m68k
Debian Linux 4.0 ia-64
Debian Linux 4.0 ia-32
Debian Linux 4.0 hppa
Debian Linux 4.0 armel
Debian Linux 4.0 arm
Debian Linux 4.0 amd64
Debian Linux 4.0 alpha
Debian Linux 4.0
Not Vulnerable:

Discussion

PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

PHP is prone to a directory-traversal vulnerability because the application fails to adequately sanitize user-supplied input.


A successful attack may allow an attacker to create or overwrite arbitrary files on the system. This may allow arbitrary script code to run in the context of the webserver.

PHP 5.2.6 and prior versions are vulnerable.

Exploit / POC

PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

An attacker can exploit this issue using standard client applications.

Solution / Fix

PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

Solution:
Updates are available. Please see the references for more information.


Ubuntu Ubuntu Linux 7.10 powerpc

Debian Linux 5.0 ia-64

Ubuntu Ubuntu Linux 8.04 LTS powerpc

Ubuntu Ubuntu Linux 8.10 powerpc

Ubuntu Ubuntu Linux 8.04 LTS sparc

Ubuntu Ubuntu Linux 6.06 LTS sparc

Debian Linux 5.0 alpha

Mandriva Linux Mandrake 2008.0 x86_64

Ubuntu Ubuntu Linux 8.04 LTS amd64

Mandriva Linux Mandrake 2008.0

Ubuntu Ubuntu Linux 7.10 sparc

Debian Linux 5.0 mipsel

Debian Linux 4.0 amd64

Debian Linux 4.0 ia-32

Debian Linux 4.0 hppa

Ubuntu Ubuntu Linux 8.10 sparc

Debian Linux 4.0 armel

Debian Linux 5.0 armel

Debian Linux 5.0

Debian Linux 4.0 mipsel

Mandriva Linux Mandrake 2009.0 x86_64

Debian Linux 5.0 mips

Ubuntu Ubuntu Linux 8.10 amd64

Debian Linux 4.0 ia-64

Debian Linux 4.0 mips

Debian Linux 5.0 sparc

Mandriva Linux Mandrake 2008.1 x86_64

Debian Linux 4.0 arm

Mandriva Linux Mandrake 2008.1

Debian Linux 4.0 powerpc

Ubuntu Ubuntu Linux 8.10 i386

Debian Linux 4.0 m68k

Debian Linux 5.0 ia-32

Ubuntu Ubuntu Linux 6.06 LTS powerpc

Debian Linux 5.0 s/390

Ubuntu Ubuntu Linux 8.04 LTS lpia

Ubuntu Ubuntu Linux 7.10 lpia

Ubuntu Ubuntu Linux 6.06 LTS i386

Ubuntu Ubuntu Linux 7.10 i386

Ubuntu Ubuntu Linux 8.10 lpia

Ubuntu Ubuntu Linux 6.06 LTS amd64

Debian Linux 5.0 hppa

Debian Linux 4.0 sparc

Debian Linux 4.0 s/390

Debian Linux 5.0 m68k

Debian Linux 5.0 arm

Mandriva Linux Mandrake 2009.0

Debian Linux 4.0 alpha

Ubuntu Ubuntu Linux 7.10 amd64

MandrakeSoft Corporate Server 4.0

Debian Linux 4.0

Ubuntu Ubuntu Linux 8.04 LTS i386

References

PHP ZipArchive::extractTo() '.zip' Files Directory Traversal Vulnerability

References:

© CVE.report 2026

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. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report