Path traversal in PHP - CVE-2008-5658
Published: October 11, 2018 / Updated: June 8, 2025
PHP
Detailed vulnerability description
The vulnerability allows a remote attacker to perform directory traversal attacks.
The vulnerability exists due to input validation error when processing directory traversal sequences in the ZipArchive::extractTo function in PHP 5.2.6 and earlier. A remote authenticated attacker can send a specially crafted HTTP request and context-dependent attackers to write arbitrary files via a ZIP file with a file whose name contains . (dot dot) sequences.
How to mitigate CVE-2008-5658
Sources
- http://archives.neohapsis.com/archives/bugtraq/2008-12/0039.html
- http://lists.opensuse.org/opensuse-security-announce/2009-02/msg00002.html
- http://marc.info/?l=bugtraq&m=124654546101607&w=2
- http://marc.info/?l=bugtraq&m=125631037611762&w=2
- http://osvdb.org/50480
- http://secunia.com/advisories/35003
- http://secunia.com/advisories/35306
- http://secunia.com/advisories/35650
- http://wiki.rpath.com/Advisories:rPSA-2009-0035
- http://www.debian.org/security/2009/dsa-1789
- http://www.mandriva.com/security/advisories?name=MDVSA-2009:045
- http://www.openwall.com/lists/oss-security/2008/12/04/3
- http://www.php.net/ChangeLog-5.php#5.2.7
- http://www.redhat.com/support/errata/RHSA-2009-0350.html
- http://www.securityfocus.com/archive/1/501376/100/0/threaded
- http://www.securityfocus.com/bid/32625
- http://www.securitytracker.com/id?1021303
- http://www.sektioneins.de/advisories/SE-2008-06.txt
- https://exchange.xforce.ibmcloud.com/vulnerabilities/47079
- https://www.redhat.com/archives/fedora-package-announce/2009-May/msg01451.html
- https://www.redhat.com/archives/fedora-package-announce/2009-May/msg01465.html