CVE-2009-4142
PHP < 5.2.12 - Cross-Site Scripting via Improper UTF-8 and Multi-byte Sequence Handling
Title source: llmExploitation Summary
EIP tracks 2 public exploits for CVE-2009-4142. PoCs published by [email protected].
AI-analyzed exploit summary This exploit demonstrates a cross-site scripting (XSS) vulnerability in PHP versions prior to 5.2.12 due to improper sanitization of user-supplied input when using the Shift_JIS charset. The PoC shows how an attacker can inject malicious JavaScript into a web page via crafted GET parameters.
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.
Exploits (2)
This exploit demonstrates a cross-site scripting (XSS) vulnerability in PHP versions prior to 5.2.12 due to improper sanitization of user-supplied input when using the Shift_JIS charset. The PoC shows how an attacker can inject malicious JavaScript into a web page via crafted GET parameters.
This exploit demonstrates a cross-site scripting (XSS) vulnerability in PHP versions prior to 5.2.12 due to improper sanitization of user-supplied input with malformed UTF-8, Shift_JIS, and EUC-JP sequences. The PoC shows how `htmlspecialchars` fails to properly escape these sequences, allowing arbitrary script execution in a user's browser context.