#VU110281 Cross-site scripting in PHP - CVE-2009-5016


| Updated: 2025-06-08

Vulnerability identifier: #VU110281

Vulnerability risk: Medium

CVSSv4.0: N/A

CVE-ID: CVE-2009-5016

CWE-ID: CWE-79

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 perform cross-site scripting (XSS) attacks.

The vulnerability exists due to insufficient sanitization of user-supplied data when processing data passed via a crafted string that uses overlong UTF-8 encoding, a different vulnerability than CVE-2010-3870. A remote attacker can trick the victim to follow a specially crafted link and execute arbitrary HTML and script code in user's browser in context of vulnerable website.

Successful exploitation of this vulnerability may allow a remote attacker to steal potentially sensitive information, change appearance of the web page, perform phishing and drive-by-download attacks.

Mitigation
Install update from vendor's website.

Vulnerable software versions

PHP: 1.0, 2.0, 2.0b10, 3.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.1, 4.1.1, 4.1.2, 4.2, 4.2.1, 4.2.2, 4.2.3, 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


External links
https://bugs.php.net/bug.php?id=49687
https://lists.fedoraproject.org/pipermail/package-announce/2011-January/052836.html
https://lists.fedoraproject.org/pipermail/package-announce/2011-January/052845.html
https://secunia.com/advisories/42410
https://secunia.com/advisories/42812
https://sirdarckcat.blogspot.com/2009/10/couple-of-unicode-issues-on-php-and.html
https://www.blackhat.com/presentations/bh-usa-09/VELANAVA/BHUSA09-VelaNava-FavoriteXSS-SLIDES.pdf
https://www.redhat.com/support/errata/RHSA-2010-0919.html
https://www.redhat.com/support/errata/RHSA-2011-0195.html
https://www.securityfocus.com/bid/44889
https://www.ubuntu.com/usn/USN-1042-1
https://www.vupen.com/english/advisories/2010/3081
https://www.vupen.com/english/advisories/2011/0020
https://www.vupen.com/english/advisories/2011/0021
https://www.vupen.com/english/advisories/2011/0077


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