Vulnerabilities · 2009 · Php
CVE-2009-4142
Php vulnerability
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. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Php runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- secunia.com/advisories/37821 · Vendor Advisory
- www.vupen.com/english/advisories/2009/3593 · Vendor Advisory
- www.php.net/ChangeLog-5.php · Patch
- securitytracker.com/id?1023372 · Exploit
- www.securityfocus.com/bid/37389 · Exploit
- bugs.php.net/bug.php?id=49785
- lists.apple.com/archives/security-announce/2010//Mar/msg00001.html
- marc.info/?l=bugtraq&m=127680701405735&w=2
- nvd.nist.gov/vuln/detail/CVE-2009-4142
- cve.org/CVERecord?id=CVE-2009-4142
More vulnerabilities in Php products
CVE-2025-14180CVE-2025-14178CVE-2025-14177CVE-2025-6491CVE-2025-1861CVE-2025-1736CVE-2025-1735CVE-2025-1734All 740
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.