CVE-2012-1172 json
The file-upload implementation in rfc1867.c in PHP before 5.4.0 does not properly handle invalid [ (open square bracket) characters in name…
published 2012-05-24 14 y ago modified 2026-06-16 4 mo ago also EUVD-2012-1202
- cvss
- 5.8
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 6.2%
- EPSS 6.2% chance of exploitation in 30 days, percentile 93%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- php53 RHEL 5 5.3.3-13.el5_8
- php53-gd RHEL 5 5.3.3-13.el5_8
- php53-cli RHEL 5 5.3.3-13.el5_8
- php53-dba RHEL 5 5.3.3-13.el5_8
- php53-pdo RHEL 5 5.3.3-13.el5_8
- php53-xml RHEL 5 5.3.3-13.el5_8
- php53-imap RHEL 5 5.3.3-13.el5_8
- php53-intl RHEL 5 5.3.3-13.el5_8
red hat advisories RHSA-2012:1047RHSA-2012:1046RHSA-2012:1045
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2012-1172 updated cvss 6.4
php: $_FILES array indexes corruption
-
Red Hat Enterprise Linux (v. 5 server) php 5.1.6-39.el5_8, php53 5.3.3-13.el5_8, php-gd 5.1.6-39.el5_8, php-cli 5.1.6-39.el5_8, php-dba 5.1.6-39.el5_8, php-pdo 5.1.6-39.el5_8, +32 morefixed: vendor fix RHSA-2012:1045
-
Red Hat Enterprise Linux Desktop Optional (v. 6) php 5.3.3-14.el6_3, php-gd 5.3.3-14.el6_3, php-cli 5.3.3-14.el6_3, php-dba 5.3.3-14.el6_3, php-pdo 5.3.3-14.el6_3, php-xml 5.3.3-14.el6_3, +19 more Red Hat Enterprise Linux HPC Node (v. 6) php 5.3.3-14.el6_3, php-cli 5.3.3-14.el6_3, php-common 5.3.3-14.el6_3 Red Hat Enterprise Linux HPC Node Optional (v. 6) php 5.3.3-14.el6_3, php-gd 5.3.3-14.el6_3, php-dba 5.3.3-14.el6_3, php-pdo 5.3.3-14.el6_3, php-xml 5.3.3-14.el6_3, php-zts 5.3.3-14.el6_3, +17 more Red Hat Enterprise Linux Server (v. 6) php 5.3.3-14.el6_3, php-gd 5.3.3-14.el6_3, php-cli 5.3.3-14.el6_3, php-pdo 5.3.3-14.el6_3, php-xml 5.3.3-14.el6_3, php-ldap 5.3.3-14.el6_3, +6 more Red Hat Enterprise Linux Server Optional (v. 6) php 5.3.3-14.el6_3, php-dba 5.3.3-14.el6_3, php-zts 5.3.3-14.el6_3, php-imap 5.3.3-14.el6_3, php-intl 5.3.3-14.el6_3, php-snmp 5.3.3-14.el6_3, +8 more Red Hat Enterprise Linux Workstation (v. 6) php 5.3.3-14.el6_3, php-gd 5.3.3-14.el6_3, php-cli 5.3.3-14.el6_3, php-pdo 5.3.3-14.el6_3, php-xml 5.3.3-14.el6_3, php-ldap 5.3.3-14.el6_3, +6 morefixed: vendor fix RHSA-2012:1046
+1 more productsfewer
Red Hat Enterprise Linux Workstation Optional (v. 6) php 5.3.3-14.el6_3, php-dba 5.3.3-14.el6_3, php-zts 5.3.3-14.el6_3, php-imap 5.3.3-14.el6_3, php-intl 5.3.3-14.el6_3, php-snmp 5.3.3-14.el6_3, +8 more -
Red Hat RHEL Desktop Workstation (v. 5 client) php 5.1.6-39.el5_8, php53 5.3.3-13.el5_8, php-gd 5.1.6-39.el5_8, php-cli 5.1.6-39.el5_8, php-dba 5.1.6-39.el5_8, php-pdo 5.1.6-39.el5_8, +32 morefixed: vendor fix RHSA-2012:1045
-
Red Hat Enterprise Linux 4 phpnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
6.19% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- bugs.php.net https://bugs.php.net/bug.php?id=54374 referenced PoC, tagged "exploit" by a source, unverified
- nealpoole.com https://nealpoole.com/blog/2011/10/directory-traversal-via-php-multi-file-uploads/ referenced PoC, tagged "exploit" by a source, unverified
- bugs.php.net https://bugs.php.net/bug.php?id=48597 referenced PoC, tagged "exploit" by a source, unverified
- isisblogs.poly.edu http://isisblogs.poly.edu/2011/08/11/php-not-properly-checking-params/ referenced PoC, tagged "exploit" by a source, unverified
- students.mimuw.edu.pl https://students.mimuw.edu.pl/~ai292615/php_multipleupload_overwrite.pdf referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 5.8 | AV:N/AC:M/Au:N/C:N/I:P/A:P |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
- Technology feeds
References
-
svn.php.net
/viewvc/php/php-src/branches/PHP_5_4/main/rfc1867.c?r1=321664&r2=321663&pathrev=321664
patch
-
bugs.php.net
/bug.php?id=54374
exploit
-
nealpoole.com
/blog/2011/10/directory-traversal-via-php-multi-file-uploads/
exploit
-
bugs.php.net
/bug.php?id=48597
exploit
-
isisblogs.poly.edu
/2011/08/11/php-not-properly-checking-params/
exploit
-
students.mimuw.edu.pl
/~ai292615/php_multipleupload_overwrite.pdf
exploit
-
marc.info
/?l=bugtraq&m=134012830914727&w=2
vendor-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080070.html
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-05/msg00011.html
vendor-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-05/msg00007.html
vendor-advisory
-
lists.apple.com
/archives/security-announce/2012/Sep/msg00004.html
vendor-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080041.html
vendor-advisory
-
debian.org
/security/2012/dsa-2465
vendor-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080037.html
vendor-advisory
- bugs.php.net /bug.php?id=49683
- svn.php.net /viewvc?view=revision&revision=321664
-
openwall.com
/lists/oss-security/2012/03/13/4
mailing-list
- support.apple.com /kb/HT5501
- php.net /ChangeLog-5.php#5.4.0
- bugs.php.net /bug.php?id=55500
Sources
- CVE List CVE-2012-1172
- NVD CVE-2012-1172
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.