Back
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,…
Medium4.3EPSS 6.5%
- Published
- Updated
- Reserved
- Assigned by
- redhat
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 2.0 | Medium4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
- EPSS (exploitation in 30 days)
- 6.5% · top 6.2% of all CVEs (4 Nov 2026)
Loading the EPSS history…
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.3.
Weakness
Affected products
n/a
- affected n/a
References (15)
- 37389 (opens in a new tab)vdb-entryx_refsource_BIDx_transferred
- http://www.php.net/releases/5_2_12.php (opens in a new tab)x_refsource_CONFIRMx_transferred
- http://bugs.php.net/bug.php?id=49785 (opens in a new tab)x_refsource_CONFIRMx_transferred
- 40262 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- HPSBUX02543 (opens in a new tab)vendor-advisoryx_refsource_HPx_transferred
- 1023372 (opens in a new tab)vdb-entryx_refsource_SECTRACKx_transferred
- 37821 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 38648 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- APPLE-SA-2010-03-29-1 (opens in a new tab)vendor-advisoryx_refsource_APPLEx_transferred
- http://www.php.net/ChangeLog-5.php (opens in a new tab)x_refsource_CONFIRMx_transferred
- oval:org.mitre.oval:def:7085 (opens in a new tab)vdb-entrysignaturex_refsource_OVALx_transferred
- oval:org.mitre.oval:def:10005 (opens in a new tab)vdb-entrysignaturex_refsource_OVALx_transferred
- http://support.apple.com/kb/HT4077 (opens in a new tab)x_refsource_CONFIRMx_transferred
- ADV-2009-3593 (opens in a new tab)vdb-entryx_refsource_VUPENx_transferred
- DSA-2001 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2009-4142)Record last updated .