Description
The sapi_header_op function in main/SAPI.c in PHP before 5.3.11 and 5.4.x before 5.4.0RC2 does not check for %0D sequences (aka carriage return characters), which allows remote attackers to bypass an HTTP response-splitting protection mechanism via a crafted URL, related to improper interaction between the PHP header function and certain browsers, as demonstrated by Internet Explorer and Google Chrome.
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.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 6 | php +26 | 5.3.3-22.el6 | RHSA-2013:0514 |
| RHEL 5 | php +18 | 5.1.6-43.el5_10 | RHSA-2013:1814 |
| RHEL 5 | php53 +20 | 5.3.3-21.el5 | RHSA-2013:1307 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 5.3.11/5.4.0RC2 - 'header()' HTTP Header Injection EDB-37688 · remote · Oct 6, 2011 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2013:1814 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- 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
References
- [oss-security] 20120905 Re: php header() header injection detection bypass mailing-list
- http://security-tracker.debian.org/tracker/CVE-2011-1398
- 1027463 vdb-entry
- 55078 third-party-advisory
- https://bugs.php.net/bug.php?id=60227
- RHSA-2013:1307 vendor-advisory
- [oss-security] 20120829 php header() header injection detection bypass mailing-list
- SUSE-SU-2013:1315 vendor-advisory
- [internals] 20120203 [PHP-DEV] The case of HTTP response splitting protection in PHP mailing-list
- USN-1569-1 vendor-advisory