Description
The file-upload implementation in rfc1867.c in PHP before 5.4.0 does not properly handle invalid [ (open square bracket) characters in name values, which makes it easier for remote attackers to cause a denial of service (malformed $_FILES indexes) or conduct directory traversal attacks during multi-file uploads by leveraging a script that lacks its own filename restrictions.
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+squeeze9 | DSA-2465-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | php +25 | 5.3.3-14.el6_3 | RHSA-2012:1046 |
| RHEL 5 | php +18 | 5.1.6-39.el5_8 | RHSA-2012:1045 |
| RHEL 5 | php53 +20 | 5.3.3-13.el5_8 | RHSA-2012:1047 |
Advisories 4
- RHSA-2012:1046 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 28, 2026
- RHSA-2012:1047 Red Hat Security Advisory: php53 security update Red Hat Security Advisories (RHSA) · Jun 28, 2026
- RHSA-2012:1045 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 28, 2026
- DSA-2465-1 php5 - several Debian Security (DSA / DLA) · Mar 9, 2026
References
- SSRT100856 vendor-advisory
- http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/main/rfc1867.c?r1=321664&r2=321663&pathrev=321664
- FEDORA-2012-6869 vendor-advisory
- https://bugs.php.net/bug.php?id=54374
- SUSE-SU-2012:0604 vendor-advisory
- https://bugs.php.net/bug.php?id=49683
- https://nealpoole.com/blog/2011/10/directory-traversal-via-php-multi-file-uploads/
- http://svn.php.net/viewvc?view=revision&revision=321664
- [oss-security] 20120313 Re: CVE request for PHP 5.3.x Corrupted $_FILES indices lead to security concern mailing-list
- https://bugs.php.net/bug.php?id=48597
- SUSE-SU-2012:0598 vendor-advisory
- http://isisblogs.poly.edu/2011/08/11/php-not-properly-checking-params/
- APPLE-SA-2012-09-19-2 vendor-advisory
- http://support.apple.com/kb/HT5501
- https://students.mimuw.edu.pl/~ai292615/php_multipleupload_overwrite.pdf
- http://www.php.net/ChangeLog-5.php#5.4.0
- FEDORA-2012-6907 vendor-advisory
- DSA-2465 vendor-advisory
- FEDORA-2012-6911 vendor-advisory
- https://bugs.php.net/bug.php?id=55500