Description
The rfc1867_post_handler function in main/rfc1867.c in PHP before 5.3.7 does not properly restrict filenames in multipart/form-data POST requests, which allows remote attackers to conduct absolute path traversal attacks, and possibly create or overwrite arbitrary files, via a crafted upload request, related to a "file path injection vulnerability."
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 6.0 | php5 | 5.3.3-7+squeeze3 | DSA-2266-1 |
| Debian 5.0 | php5 | 5.2.6.dfsg.1-1+lenny12 | DSA-2266-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | php +25 | 5.3.3-3.el6_1.3 | RHSA-2011:1423 |
| RHEL 5 | php +18 | 5.1.6-27.el5_7.4 | RHSA-2012:0033 |
| RHEL 5 | php53 +20 | 5.3.3-1.el5_7.3 | RHSA-2011:1423 |
| RHEL 4 | php +13 | 4.3.9-3.35 | RHSA-2012:0071 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php5 | 5.6.28-1.1 | openSUSE-SU-2024:10344-1 |
| openSUSE Tumbleweed | php7 | 7.0.14-1.4 | openSUSE-SU-2024:10290-1 |
| openSUSE Tumbleweed | php8 | 8.0.11-1.1 | openSUSE-SU-2024:11169-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 5.3.6 - Security Bypass EDB-35855 · remote · Jun 14, 2011 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 7
- RHSA-2011:1423 Red Hat Security Advisory: php53 and php security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2012:0071 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2012:0033 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-2266-1 php5 - several Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2024:10290-1 apache2-mod_php7-7.0.14-1.4 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10344-1 apache2-mod_php5-5.6.28-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
References
- 48259 vdb-entry
- http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/main/rfc1867.c?r1=312103&r2=312102&pathrev=312103
- HPSBOV02763 vendor-advisory
- http://svn.php.net/viewvc?view=revision&revision=312103
- http://support.apple.com/kb/HT5130
- 49241 vdb-entry
- 1025659 vdb-entry
- php-sapiposthandlerfunc-sec-bypass(67999) vdb-entry
- MDVSA-2011:165 vendor-advisory
- http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/NEWS?view=markup&pathrev=312103
- 44874 third-party-advisory
- DSA-2266 vendor-advisory
- APPLE-SA-2012-02-01-1 vendor-advisory
- [oss-security] 20110613 Re: CVE Request: PHP File upload filename mailing-list
- http://bugs.php.net/bug.php?id=54939
- RHSA-2011:1423 vendor-advisory
- http://www.php.net/ChangeLog-5.php#5.3.7
- [oss-security] 20110612 CVE Request: PHP File upload filename mailing-list
- RHSA-2012:0071 vendor-advisory
- http://www.php.net/archive/2011.php#id2011-08-18-1
- http://pastebin.com/1edSuSVN