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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 6.0 | php5 | 5.3.3-7+squeeze8 | DSA-2408-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | php +26 | 5.3.3-22.el6 | RHSA-2013:0514 |
| RHEL 5 | php53 +20 | 5.3.3-21.el5 | RHSA-2013:1307 |
Advisories 3
- RHSA-2013:0514 Red Hat Security Advisory: php security, bug fix and enhancement update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2013:1307 Red Hat Security Advisory: php53 security, bug fix and enhancement update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-2408-1 php5 - several Debian Security (DSA / DLA) · Mar 9, 2026
References
- USN-1358-1 vendor-advisory
- SUSE-SU-2012:0411 vendor-advisory
- 55078 third-party-advisory
- http://svn.php.net/viewvc?view=revision&revision=323016
- openSUSE-SU-2012:0426 vendor-advisory
- SUSE-SU-2012:0472 vendor-advisory
- 48668 third-party-advisory
- APPLE-SA-2012-09-19-2 vendor-advisory
- RHSA-2013:1307 vendor-advisory
- http://support.apple.com/kb/HT5501
- FEDORA-2012-6907 vendor-advisory
- https://launchpadlibrarian.net/92454212/php5_5.3.2-1ubuntu4.13.diff.gz
- php-magicquotesgpc-sec-bypass(73125) vdb-entry
- 51954 vdb-entry
- FEDORA-2012-6911 vendor-advisory