CVE-2008-5658: Directory traversal vulnerability in the ZipArchive::extractTo function in PHP 5.2.6 and earlier allows context-dependent attackers to write…
Noroxi assessment
Priority: Monitor (action score 31/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 4% (FIRST EPSS); higher than 90.7% of all records.
- No special conditions are required; it is repeatable.
- Fixed version: php5 (Debian:4.0) 5.2.0+dfsg-8+etch15; php5 (Debian:5.0) 5.2.6.dfsg.1-1+lenny3, 5.2.6.dfsg.1-1+lenny2; php (Red Hat:rhel_application_stack:2) 0:5.2.6-4.el5s2.
Low priority for now. Upgrade to php5 (Debian:4.0) 5.2.0+dfsg-8+etch15; php5 (Debian:5.0) 5.2.6.dfsg.1-1+lenny3, 5.2.6.dfsg.1-1+lenny2; php (Red Hat:rhel_application_stack:2) 0:5.2.6-4.el5s2 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
Directory traversal vulnerability in the ZipArchive::extractTo function in PHP 5.2.6 and earlier allows context-dependent attackers to write arbitrary files via a ZIP file with a file whose name contains .. (dot dot) sequences.
- Published
- Dec 17, 2008
- Updated
- Jun 16, 2026
- EPSS
- 4.0% · 90th percentile
- CWE
- CWE-22
Report tools
Action score
31
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 4.0%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php phpup to 5.2.6 inclusive
- php php5.0.0
- php php5.0.1
- php php5.0.2
- php php5.0.3
- php php5.0.4
- php php5.0.5
- php php5.1.0
+12 more rows
- php php5.1.1
- php php5.1.2
- php php5.1.3
- php php5.1.4
- php php5.1.5
- php php5.1.6
- php php5.2.0
- php php5.2.1
- php php5.2.2
- php php5.2.3
- php php5.2.4
- php php5.2.5
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:4.0 | php5 | before 5.2.0+dfsg-8+etch15 | 5.2.0+dfsg-8+etch15 |
| Debian:5.0 | php5 | before 5.2.6.dfsg.1-1+lenny3 | 5.2.6.dfsg.1-1+lenny3 |
| Debian:5.0 | php5 | before 5.2.6.dfsg.1-1+lenny2 | 5.2.6.dfsg.1-1+lenny2 |
| Red Hat:rhel_application_stack:2 | php | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-bcmath | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-cli | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-common | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-dba | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-debuginfo | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-devel | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-gd | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-imap | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-ldap | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-mbstring | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-mysql | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-ncurses | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-odbc | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-pdo | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-pgsql | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-snmp | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-soap | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-xml | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
| Red Hat:rhel_application_stack:2 | php-xmlrpc | before 0:5.2.6-4.el5s2 | 0:5.2.6-4.el5s2 |
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle…KEV99Now
Published before and after this one in the same product
- ← EarlierCVE-2008-5624Dec 17, 2008 · PHP 5 before 5.2.7 does not properly initialize the page_uid and page_gid global variables for use by the SAPI php_getuid function, which…31Monitor
- ← EarlierCVE-2008-5625Dec 17, 2008 · PHP 5 before 5.2.7 does not enforce the error_log safe_mode restrictions when safe_mode is enabled through a php_admin_flag setting in…32Monitor
- Later →CVE-2008-5557Dec 23, 2008 · Heap-based buffer overflow in ext/mbstring/libmbfl/filters/mbfilter_htmlent.c in the mbstring extension in PHP 4.3.0 through 5.2.6 allows…42Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:php5 | 5.2.0+dfsg-8+etch15 · Debian:4.0 | Package registry (OSV) |
| red hat:php | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-bcmath | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-cli | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-common | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-dba | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-debuginfo | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-devel | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-gd | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-imap | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-ldap | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-mbstring | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
| red hat:php-mysql | 0:5.2.6-4.el5s2 · Red Hat:rhel_application_stack:2 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- P · data can be read
- Integrity
- P · data or configuration can be modified
- Availability
- P · the service can be disrupted
- Attack complexity
- Low
- Confidentiality impact
- P
- Integrity impact
- P
- Availability impact
- P
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vector
AV:N/AC:L/Au:N/C:P/I:P/A:P
nvd-primary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);
res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);
if (!file.startsWith(ROOT + path.sep)) {
return res.sendStatus(400);
}
res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (19 more)Show less
- lists.opensuse.org/opensuse-security-announce/2009-02/msg00002.html
- marc.info/?l=bugtraq&m=124654546101607&w=2
- marc.info/?l=bugtraq&m=125631037611762&w=2
- osvdb.org/50480
- secunia.com/advisories/35003
- secunia.com/advisories/35306
- secunia.com/advisories/35650
- wiki.rpath.com/Advisories:rPSA-2009-0035
- www.debian.org/security/2009/dsa-1789
- www.mandriva.com/security/advisories?name=MDVSA-2009:045
- www.openwall.com/lists/oss-security/2008/12/04/3
- www.php.net/ChangeLog-5.php#5.2.7
- www.redhat.com/support/errata/RHSA-2009-0350.html
- www.securityfocus.com/archive/1/501376/100/0/threaded
- www.securityfocus.com/bid/32625
- www.securitytracker.com/id?1021303
- exchange.xforce.ibmcloud.com/vulnerabilities/47079
- www.redhat.com/archives/fedora-package-announce/2009-May/msg01451.html
- www.redhat.com/archives/fedora-package-announce/2009-May/msg01465.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.