Skip to content
Fencer Intel
medium 6.8

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

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 more
    fixed: 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 more
    fixed: 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 more
    fixed: 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 more
    fixed: vendor fix RHSA-2013:0514
  • Red Hat Enterprise Linux 5 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.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

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.