XSS in PHP
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.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v2 metric
CVSS v2 base score 4.3 (Medium). Vector: AV:N/AC:M/Au:N/C:N/I:P/A:N. This CVE predates CVSS v3 and has no v3 score from NVD.
EPSS exploit prediction
EPSS 0.065, 93.9th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- PHP — versions 1.0, 2.0, 2.0b10
Weakness classification (CWE)
References
- www.securityfocus.com/bid/37389 (Exploit, vdb-entry)
- www.php.net/releases/5_2_12.php
- bugs.php.net/bug.php
- secunia.com/advisories/40262 (third-party-advisory)
- HPSBUX02543 (vendor-advisory)
- securitytracker.com/id (Exploit, vdb-entry)
- secunia.com/advisories/37821 (third-party-advisory, Vendor Advisory)
- secunia.com/advisories/38648 (third-party-advisory)
- APPLE-SA-2010-03-29-1 (vendor-advisory)
- www.php.net/ChangeLog-5.php (Patch)