Skip to content
Fencer Intel
medium 5.8

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 more
    fixed: 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 more
    +1 more products
    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
    fixed: vendor fix RHSA-2012:1046
  • 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 more
    fixed: vendor fix RHSA-2012:1045
  • Red Hat Enterprise Linux 4 php
    not 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

Sources

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.