Description
Buffer overflow in the memnstr function in PHP 4.4.x before 4.4.9 and PHP 5.6 through 5.2.6 allows context-dependent attackers to cause a denial of service (crash) and possibly execute arbitrary code via the delimiter argument to the explode function. NOTE: the scope of this issue is limited since most applications would not use an attacker-controlled delimiter, but local attacks against safe_mode are feasible.
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 4.0 | php5 | 5.2.0-8+etch13 | DSA-1647-1 |
Advisories 1
- DSA-1647-1 php5 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- 1020995 vdb-entry
- 32746 third-party-advisory
- HPSBUX02465 vendor-advisory
- http://support.apple.com/kb/HT3549
- GLSA-200811-05 vendor-advisory
- SSRT090085 vendor-advisory
- 31982 third-party-advisory
- 20090302 rPSA-2009-0035-1 php php-cgi php-imap php-mcrypt php-mysql php-mysqli php-pgsql php-soap php-xsl php5 php5-cgi php5-imap php5-mcrypt php5-mysql php5-mysqli php5-pear php5-pgsql php5-soap php5-xsl mailing-list
- MDVSA-2009:024 vendor-advisory
- 47483 vdb-entry
- http://wiki.rpath.com/Advisories:rPSA-2009-0035
- 35074 third-party-advisory
- 32148 third-party-advisory
- APPLE-SA-2009-05-12 vendor-advisory
- [oss-security] 20080808 CVE request: php-5.2.6 overflow issues mailing-list
- SUSE-SR:2008:018 vendor-advisory
- SUSE-SR:2008:021 vendor-advisory
- MDVSA-2009:023 vendor-advisory
- MDVSA-2009:022 vendor-advisory
- php-memnstr-bo(44405) vdb-entry
- TA09-133A third-party-advisory
- [oss-security] 20080813 Re: CVE request: php-5.2.6 overflow issues mailing-list
- ADV-2009-1297 vdb-entry
- http://bugs.gentoo.org/show_bug.cgi?id=234102
- MDVSA-2009:021 vendor-advisory
- [oss-security] 20080808 Re: CVE request: php-5.2.6 overflow issues mailing-list
- DSA-1647 vendor-advisory
- ADV-2008-2336 vdb-entry
- [oss-security] 20080808 Re: CVE request: php-5.2.6 overflow issues mailing-list
- http://www.php.net/archive/2008.php#id2008-08-07-1
- http://news.php.net/php.cvs/52002
- 35650 third-party-advisory
- 32316 third-party-advisory