{"id":"CVE-2009-4142","published":"2009-12-21T16:00:00Z","modified":"2024-08-07T06:54:09Z","title":"The htmlspecialchars function in PHP before 5.2.12 does not properly handle (1) overlong UTF-8 sequences, (2) invalid…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.06497,"percentile":0.93921,"provenance":"source"},"cwes":[],"references":[{"url":"http://www.securityfocus.com/bid/37389","tags":["vdb-entry","x_refsource_BID"]},{"url":"http://www.php.net/releases/5_2_12.php","tags":["x_refsource_CONFIRM"]},{"url":"http://bugs.php.net/bug.php?id=49785","tags":["x_refsource_CONFIRM"]},{"url":"http://secunia.com/advisories/40262","tags":["third-party-advisory","x_refsource_SECUNIA"]},{"url":"http://marc.info/?l=bugtraq&m=127680701405735&w=2","tags":["vendor-advisory","x_refsource_HP"]},{"url":"http://securitytracker.com/id?1023372","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"http://secunia.com/advisories/37821","tags":["third-party-advisory","x_refsource_SECUNIA"]},{"url":"http://secunia.com/advisories/38648","tags":["third-party-advisory","x_refsource_SECUNIA"]},{"url":"http://lists.apple.com/archives/security-announce/2010//Mar/msg00001.html","tags":["vendor-advisory","x_refsource_APPLE"]},{"url":"http://www.php.net/ChangeLog-5.php","tags":["x_refsource_CONFIRM"]},{"url":"https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7085","tags":["vdb-entry","signature","x_refsource_OVAL"]},{"url":"https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10005","tags":["vdb-entry","signature","x_refsource_OVAL"]},{"url":"http://support.apple.com/kb/HT4077","tags":["x_refsource_CONFIRM"]},{"url":"http://www.vupen.com/english/advisories/2009/3593","tags":["vdb-entry","x_refsource_VUPEN"]},{"url":"http://www.debian.org/security/2010/dsa-2001","tags":["vendor-advisory","x_refsource_DEBIAN"]}],"priority":{"score":23.8,"factors":[{"name":"EPSS percentile","points":18.78},{"name":"Public exploit code","points":5.0}]},"exploitSources":{"exploitdb":{"count":2,"earliest":"2009-12-17"},"first":{"date":"2009-12-17","source":"Exploit-DB","url":"https://www.exploit-db.com/exploits/33414"},"provenance":"source"},"summary":{"text":"The htmlspecialchars function in PHP versions before 5.2.12 mishandles overlong UTF-8 sequences and invalid Shift_JIS and EUC-JP byte sequences.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:02:34Z"},"euvd":{"id":"EUVD-2009-4112","exploited":false,"provenance":"source"},"exploits":[{"id":33414,"url":"https://www.exploit-db.com/exploits/33414","title":"PHP 5.2.11 - 'htmlspecialCharacters()' Malformed Multibyte Character Cross-Site Scripting (1)","date":"2009-12-17","verified":true,"provenance":"source"},{"id":33415,"url":"https://www.exploit-db.com/exploits/33415","title":"PHP 5.2.11 - 'htmlspecialCharacters()' Malformed Multibyte Character Cross-Site Scripting (2)","date":"2009-12-17","verified":true,"provenance":"source"}]}