php: htmlspecialchars() insufficient checking of input for multi-byte encodings
Published Dec 21, 2009
4.3
MEDIUMCVSS 2.0
EPSS 6.50%
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.
Affected products
No data.
- ≤ 5.2.11
- 1.0
- 2.0
- 2.0b10
- 3.0
- 3.0.1
- 3.0.2
- 3.0.3
- 3.0.4
- 3.0.5
- 3.0.6
- 3.0.7
- 3.0.8
- 3.0.9
- 3.0.10
- 3.0.11
- 3.0.12
- 3.0.13
- 3.0.14
- 3.0.15
- 3.0.16
- 3.0.17
- 3.0.18
- 4
- 4.0
- 4.0
- 4.0
- 4.0
- 4.0
- 4.0
- 4.0
- 4.0
- 4.0.0
- 4.0.1
- 4.0.1
- 4.0.1
- 4.0.2
- 4.0.3
- 4.0.3
- 4.0.4
- 4.0.4
- 4.0.5
- 4.0.6
- 4.0.7
- 4.0.7
- 4.0.7
- 4.0.7
- 4.0.7
- 4.1.0
- 4.1.1
- 4.1.2
- 4.2
- 4.2.0
- 4.2.1
- 4.2.2
- 4.2.3
- 4.3.0
- 4.3.1
- 4.3.2
- 4.3.3
- 4.3.4
- 4.3.5
- 4.3.6
- 4.3.7
- 4.3.8
- 4.3.9
- 4.3.10
- 4.3.11
- 4.4.0
- 4.4.1
- 4.4.2
- 4.4.3
- 4.4.4
- 4.4.5
- 4.4.6
- 4.4.7
- 4.4.8
- 4.4.9
- 5
- 5.0
- 5.0
- 5.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.0
- 5.0.1
- 5.0.2
- 5.0.3
- 5.0.4
- 5.0.5
- 5.1.0
- 5.1.1
- 5.1.3
- 5.1.4
- 5.1.5
- 5.1.6
- 5.2.0
- 5.2.1
- 5.2.2
- 5.2.3
- 5.2.4
- 5.2.5
- 5.2.6
- 5.2.8
- 5.2.9
- 5.2.10
No data.
Red Hat Enterprise Linux 3
php-0:4.3.2-54.ent
Fixed · RHSA-2010:0040
Red Hat Enterprise Linux 4
php-0:4.3.9-3.29
Fixed · RHSA-2010:0040
Red Hat Enterprise Linux 5
php-0:5.1.6-24.el5_4.5
Fixed · RHSA-2010:0040
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 3 | php-0:4.3.2-54.ent | Fixed | RHSA-2010:0040 |
| Red Hat Enterprise Linux 4 | php-0:4.3.9-3.29 | Fixed | RHSA-2010:0040 |
| Red Hat Enterprise Linux 5 | php-0:5.1.6-24.el5_4.5 | Fixed | RHSA-2010:0040 |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
AV:N/AC:M/Au:N/C:N/I:P/A:N
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (21 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 6.50% (0.06497) | 93.56th | v5 (v2026.06.15) |
| Jun 15, 2026 | 6.50% (0.06497) | 92.87th | v5 (v2026.06.15) |
| Dec 28, 2025 | 16.95% (0.16946) | 94.75th | v4 (v2025.03.14) |
| Dec 27, 2025 | 24.54% (0.24542) | 95.96th | v4 (v2025.03.14) |
| Oct 28, 2025 | 16.95% (0.16946) | 94.68th | v4 (v2025.03.14) |
| Oct 27, 2025 | 24.54% (0.24542) | 95.88th | v4 (v2025.03.14) |
| Oct 15, 2025 | 16.95% (0.16946) | 94.65th | v4 (v2025.03.14) |
| Oct 1, 2025 | 13.29% (0.13292) | 93.95th | v4 (v2025.03.14) |
| Jul 30, 2025 | 17.37% (0.17366) | 94.77th | v4 (v2025.03.14) |
| May 30, 2025 | 13.29% (0.13292) | 93.76th | v4 (v2025.03.14) |
| Mar 30, 2025 | 6.81% (0.06808) | 90.43th | v4 (v2025.03.14) |
| Mar 29, 2025 | 8.03% (0.08032) | 86.58th | v4 (v2025.03.14) |
| Mar 17, 2025 | 6.81% (0.06808) | 90.64th | v4 (v2025.03.14) |
| Dec 17, 2024 | 9.04% (0.09045) | 94.62th | v3 (v2023.03.01) |
| Dec 12, 2024 | 2.00% (0.01997) | 89.31th | v3 (v2023.03.01) |
| Mar 7, 2023 | 2.00% (0.01997) | 87.03th | v3 (v2023.03.01) |
| Mar 6, 2023 | 12.33% (0.12328) | 95.32th | v2 (v2022.01.01) |
| Feb 13, 2023 | 12.33% (0.12328) | 95.15th | v2 (v2022.01.01) |
| Feb 3, 2023 | 21.87% (0.21871) | 96.49th | v2 (v2022.01.01) |
| Apr 1, 2022 | 12.33% (0.12328) | 94.95th | v2 (v2022.01.01) |
| Feb 4, 2022 | 12.33% (0.12328) | 89.44th | v2 (v2022.01.01) |
References (19)
- http://bugs.php.net/bug.php?id=49785 x_refsource_CONFIRM
- http://lists.apple.com/archives/security-announce/2010//Mar/msg00001.html vendor-advisoryx_refsource_APPLE
- http://marc.info/?l=bugtraq&m=127680701405735&w=2 vendor-advisoryx_refsource_HP
- http://secunia.com/advisories/37821 third-party-advisoryx_refsource_SECUNIAVendor Advisory
- http://secunia.com/advisories/38648 third-party-advisoryx_refsource_SECUNIA
- http://secunia.com/advisories/40262 third-party-advisoryx_refsource_SECUNIA
- http://securitytracker.com/id?1023372 vdb-entryx_refsource_SECTRACKExploit
- http://support.apple.com/kb/HT4077 x_refsource_CONFIRM
- http://www.debian.org/security/2010/dsa-2001 vendor-advisoryx_refsource_DEBIAN
- http://www.php.net/ChangeLog-5.php x_refsource_CONFIRMPatch
- http://www.php.net/releases/5_2_12.php x_refsource_CONFIRM
- http://www.securityfocus.com/bid/37389 vdb-entryx_refsource_BIDExploit
- http://www.vupen.com/english/advisories/2009/3593 vdb-entryx_refsource_VUPENVendor Advisory
- https://access.redhat.com/security/cve/CVE-2009-4142 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=548516 Issue Tracking
- https://nvd.nist.gov/vuln/detail/CVE-2009-4142
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10005 vdb-entrysignaturex_refsource_OVAL
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7085 vdb-entrysignaturex_refsource_OVAL
- https://www.cve.org/CVERecord?id=CVE-2009-4142
Change history (0)
No recorded changes yet.