What’s Vulnerable › Vulnerabilities
CVE-2009-4142
- Severity: medium (CVSS 4.3 v2.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 6.5% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2009-12-21 · updated 2026-06-16
- Weakness: CWE-79
Description
The htmlspecialchars function in PHP before 5.2.12 does not properly handle (1) overlong UTF-8 sequences, (2) invalid Shift_JIS sequences, and (3) invalid EUC-JP sequences, which allows remote attackers to conduct cross-site scripting (XSS) attacks by placing a crafted byte sequence before a special character.
Affected products
- PHP: through 5.2.11; 1.0, 2.0, 2.0b10, 3.0, 3.0.1, 3.0.2 (+104)
References
- http://bugs.php.net/bug.php?id=49785
- http://lists.apple.com/archives/security-announce/2010//Mar/msg00001.html
- http://marc.info/?l=bugtraq&m=127680701405735&w=2
- http://secunia.com/advisories/37821
- http://secunia.com/advisories/38648
- http://secunia.com/advisories/40262
- http://securitytracker.com/id?1023372
- http://support.apple.com/kb/HT4077
- http://www.debian.org/security/2010/dsa-2001
- http://www.php.net/ChangeLog-5.php
- http://www.php.net/releases/5_2_12.php
- http://www.securityfocus.com/bid/37389
Get alerted when CVE-2009-4142 or the next vulnerability affects your stack