Servers and applications
CVE-2009-4142
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.
- Severity
- Medium 4.3
- Published
- 21 Dec 2009
- Last changed
- 16 Jun 2026
- Added to UpHeron
- 14 Oct 2026
- Exploit chance
- 6.5% in the next 30 daysHigher than 93% of CVEs. EPSS by FIRST, 12 Nov 2026
- Weakness
- Cross-site scripting (CWE-79)
- Attack
- Over the network · No login needed
- Attacker can
- Change some data
- CVSS vector
AV:N/AC:M/Au:N/C:N/I:P/A:N- Sources
- NVD
Affected software
| Software | Affected versions |
|---|---|
PHPServers and applications · cpe:a:php:php |
All 107 release lines
|