#VU110332 Heap-based buffer overflow in PHP - CVE-2008-5557


| Updated: 2025-06-08

Vulnerability identifier: #VU110332

Vulnerability risk: High

CVSSv4.0: N/A

CVE-ID: CVE-2008-5557

CWE-ID: CWE-122

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
PHP
Universal components / Libraries / Scripting languages

Vendor: PHP Group

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error in Heap-based buffer overflow in ext/mbstring/libmbfl/filters/mbfilter_htmlent.c in the mbstring extension in PHP 4.3.0 through 5.2.6. A remote attacker can use a crafted string containing an HTML entity to trigger a heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.

Mitigation
Install update from vendor's website.

Vulnerable software versions

PHP: 4.3, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.8, 4.3.9, 4.3.10, 4.3.11, 4.4, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 4.4.8, 4.4.9, 5.0.0, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.1.4, 5.1.5, 5.1.6, 5.2, 5.2.1, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6


External links
https://archives.neohapsis.com/archives/fulldisclosure/2008-12/0477.html
https://bugs.php.net/bug.php?id=45722
https://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c?r1=1.7&r2=1.8
https://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02029444
https://lists.apple.com/archives/security-announce/2009/May/msg00002.html
https://lists.opensuse.org/opensuse-security-announce/2009-02/msg00002.html
https://lists.opensuse.org/opensuse-security-announce/2009-04/msg00003.html
https://marc.info/?l=bugtraq&m=124654546101607&w=2
https://marc.info/?l=bugtraq&m=125631037611762&w=2
https://secunia.com/advisories/34642
https://secunia.com/advisories/35003
https://secunia.com/advisories/35074
https://secunia.com/advisories/35306
https://secunia.com/advisories/35650
https://securitytracker.com/id?1021482
https://support.apple.com/kb/HT3549
https://wiki.rpath.com/Advisories:rPSA-2009-0035
https://www.debian.org/security/2009/dsa-1789
https://www.mandriva.com/security/advisories?name=MDVSA-2009:045
https://www.php.net/ChangeLog-5.php#5.2.7
https://www.redhat.com/support/errata/RHSA-2009-0350.html
https://www.securityfocus.com/archive/1/501376/100/0/threaded
https://www.securityfocus.com/bid/32948
https://www.us-cert.gov/cas/techalerts/TA09-133A.html
https://www.vupen.com/english/advisories/2009/1297
https://exchange.xforce.ibmcloud.com/vulnerabilities/47525
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10286
https://www.redhat.com/archives/fedora-package-announce/2009-May/msg01451.html
https://www.redhat.com/archives/fedora-package-announce/2009-May/msg01465.html


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability