Description
The init_request_info function in sapi/cgi/cgi_main.c in PHP before 5.2.6 does not properly consider operator precedence when calculating the length of PATH_TRANSLATED, which might allow remote attackers to execute arbitrary code via a crafted URI.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | php5 | 5.2.5-3+lenny1 | DTSA-135-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Rhel Application Stack 2 | httpd +2 | 2.2.8-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mod_jk +1 | 1.2.26-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mod_perl +1 | 2.0.4-3.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mod_ssl | 1:2.2.8-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mysql +6 | 5.0.50sp1a-2.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mysql-connector-odbc | 3.51.24r1071-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | mysql-jdbc | 5.0.8-1jpp.1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | perl-DBD-MySQL | 4.006-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | perl-DBI | 1.604-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | php +18 | 5.2.6-2.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | postgresql +11 | 8.2.9-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | postgresql-jdbc | 8.2.508-1jpp.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | postgresql-odbc | 08.02.0500-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | postgresqlclient81 | 8.1.11-1.el5s2 | RHSA-2008:0505 |
| Red Hat Rhel Application Stack 2 | unixODBC +2 | 2.2.12-8.el5s2 | RHSA-2008:0505 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php7 | 7.4.24-1.1 | openSUSE-SU-2024:11167-1 |
| openSUSE Tumbleweed | php8 | 8.0.11-1.1 | openSUSE-SU-2024:11169-1 |
Advisories 4
- DTSA-135-1 php5 - multiple vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:11167-1 php7-7.4.24-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11169-1 php8-8.0.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- RHSA-2008:0505 Red Hat Security Advisory: Red Hat Application Stack v2.1 security and enhancement update Red Hat Security Advisories (RHSA) · Jan 14, 2026
References
- ADV-2008-1412 vdb-entry
- 20080523 rPSA-2008-0176-1 php php-cgi php-imap php-mcrypt php-mysql php-mysqli php-pgsql php-soap php-xsl php5 php5-cgi php5-imap php5-mcrypt php5-mysql php5-mysqli php5-pear php5-pgsql php5-soap php5-xsl mailing-list
- FEDORA-2008-3606 vendor-advisory
- http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.50.2.12&r2=1.267.2.15.2.50.2.13&diff_format=u
- 32746 third-party-advisory
- 30616 third-party-advisory
- HPSBUX02342 vendor-advisory
- HPSBUX02465 vendor-advisory
- 30083 third-party-advisory
- APPLE-SA-2008-07-31 vendor-advisory
- GLSA-200811-05 vendor-advisory
- SSRT090085 vendor-advisory
- FEDORA-2008-3864 vendor-advisory
- 29009 vdb-entry
- oval:org.mitre.oval:def:5510 vdb-entry signature
- 30828 third-party-advisory
- MDVSA-2008:128 vendor-advisory
- ADV-2008-2268 vdb-entry
- 30345 third-party-advisory
- USN-628-1 vendor-advisory
- php-vector-unspecified(42137) vdb-entry
- http://wiki.rpath.com/wiki/Advisories:rPSA-2008-0176
- [oss-security] 20080502 CVE Request (PHP) mailing-list
- http://www.php.net/ChangeLog-5.php
- 31200 third-party-advisory
- SSA:2008-128-01 vendor-advisory
- 30757 third-party-advisory
- 31326 third-party-advisory
- 1019958 vdb-entry
- VU#147027 third-party-advisory
- https://issues.rpath.com/browse/RPL-2503
- RHSA-2008:0505 vendor-advisory
- ADV-2008-1810 vdb-entry
- MDVSA-2008:127 vendor-advisory
- 35650 third-party-advisory
- 30048 third-party-advisory