CVE-2012-0831 json
PHP before 5.3.10 does not properly perform a temporary change to the magic_quotes_gpc directive during the importing of environment variab…
published 2012-02-10 14 y ago modified 2026-06-16 4 mo ago also EUVD-2012-0857
- cvss
- 6.8
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 6.5%
- EPSS 6.5% chance of exploitation in 30 days, percentile 93%
- public exploits
- 0
- none known
Summary
PHP before 5.3.10 does not properly perform a temporary change to the magic_quotes_gpc directive during the importing of environment variables, which makes it easier for remote attackers to conduct SQL injection attacks via a crafted request, related to main/php_variables.c, sapi/cgi/cgi_main.c, and sapi/fpm/fpm/fpm_main.c.
Patch / fix
- php53 RHEL 5 5.3.3-21.el5
- php53-gd RHEL 5 5.3.3-21.el5
- php53-cli RHEL 5 5.3.3-21.el5
- php53-dba RHEL 5 5.3.3-21.el5
- php53-pdo RHEL 5 5.3.3-21.el5
- php53-xml RHEL 5 5.3.3-21.el5
- php53-imap RHEL 5 5.3.3-21.el5
- php53-intl RHEL 5 5.3.3-21.el5
red hat advisories RHSA-2013:1307RHSA-2013:0514
- ubuntu.com/usn/USN-1358-1 advisory
- securityfocus.com/bid/51954 advisory
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-0831 updated cvss 2.6
php: PG(magic_quote_gpc) was not restored on shutdown
-
Red Hat Enterprise Linux (v. 5 server) php53 5.3.3-21.el5, php53-gd 5.3.3-21.el5, php53-cli 5.3.3-21.el5, php53-dba 5.3.3-21.el5, php53-pdo 5.3.3-21.el5, php53-xml 5.3.3-21.el5, +14 morefixed: vendor fix RHSA-2013:1307
-
Red Hat Enterprise Linux Desktop Optional (v. 6) php 5.3.3-22.el6, php-gd 5.3.3-22.el6, php-cli 5.3.3-22.el6, php-dba 5.3.3-22.el6, php-fpm 5.3.3-22.el6, php-pdo 5.3.3-22.el6, +20 morefixed: vendor fix RHSA-2013:0514
-
Red Hat Enterprise Linux Desktop Workstation (v. 5 client) php53 5.3.3-21.el5, php53-gd 5.3.3-21.el5, php53-cli 5.3.3-21.el5, php53-dba 5.3.3-21.el5, php53-pdo 5.3.3-21.el5, php53-xml 5.3.3-21.el5, +14 morefixed: vendor fix RHSA-2013:1307
-
Red Hat Enterprise Linux HPC Node (v. 6) php 5.3.3-22.el6, php-cli 5.3.3-22.el6, php-common 5.3.3-22.el6 Red Hat Enterprise Linux HPC Node Optional (v. 6) php 5.3.3-22.el6, php-gd 5.3.3-22.el6, php-dba 5.3.3-22.el6, php-fpm 5.3.3-22.el6, php-pdo 5.3.3-22.el6, php-xml 5.3.3-22.el6, +18 more Red Hat Enterprise Linux Server (v. 6) php 5.3.3-22.el6, php-gd 5.3.3-22.el6, php-cli 5.3.3-22.el6, php-pdo 5.3.3-22.el6, php-xml 5.3.3-22.el6, php-ldap 5.3.3-22.el6, +6 more Red Hat Enterprise Linux Server Optional (v. 6) php 5.3.3-22.el6, php-dba 5.3.3-22.el6, php-fpm 5.3.3-22.el6, php-zts 5.3.3-22.el6, php-imap 5.3.3-22.el6, php-intl 5.3.3-22.el6, +9 more Red Hat Enterprise Linux Workstation (v. 6) php 5.3.3-22.el6, php-gd 5.3.3-22.el6, php-cli 5.3.3-22.el6, php-pdo 5.3.3-22.el6, php-xml 5.3.3-22.el6, php-ldap 5.3.3-22.el6, +6 more Red Hat Enterprise Linux Workstation Optional (v. 6) php 5.3.3-22.el6, php-dba 5.3.3-22.el6, php-fpm 5.3.3-22.el6, php-zts 5.3.3-22.el6, php-imap 5.3.3-22.el6, php-intl 5.3.3-22.el6, +9 morefixed: vendor fix RHSA-2013:0514
-
Red Hat Enterprise Linux 5 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.47% chance of exploitation in the next 30 days, higher than 93% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- launchpadlibrarian.net https://launchpadlibrarian.net/92454212/php5_5.3.2-1ubuntu4.13.diff.gz referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
- Technology feeds
References
-
ubuntu.com
/usn/USN-1358-1
vendor-advisory, patch, third-party-advisory
-
securityfocus.com
/bid/51954
vdb-entry, patch, third-party-advisory
-
launchpadlibrarian.net
/92454212/php5_5.3.2-1ubuntu4.13.diff.gz
exploit, third-party-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-03/msg00013.html
vendor-advisory, mailing-list, third-party-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-03/msg00016.html
vendor-advisory, mailing-list, third-party-advisory
-
lists.opensuse.org
/opensuse-security-announce/2012-04/msg00001.html
vendor-advisory, mailing-list, third-party-advisory
-
lists.apple.com
/archives/security-announce/2012/Sep/msg00004.html
vendor-advisory, mailing-list, third-party-advisory
-
rhn.redhat.com
/errata/RHSA-2013-1307.html
vendor-advisory, third-party-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080041.html
vendor-advisory, mailing-list, third-party-advisory
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080037.html
vendor-advisory, mailing-list, third-party-advisory
-
svn.php.net
/viewvc?view=revision&revision=323016
vendor-advisory
-
secunia.com
/advisories/55078
third-party-advisory
-
secunia.com
/advisories/48668
third-party-advisory
-
support.apple.com
/kb/HT5501
third-party-advisory
-
exchange.xforce.ibmcloud.com
/vulnerabilities/73125
vdb-entry, third-party-advisory
Sources
- CVE List CVE-2012-0831
- NVD CVE-2012-0831
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.