XSS in PHP

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, 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.

Vulnerability class: XSS (Cross-Site Scripting)

Published · last modified .

CVSS v2 metric

CVSS v2 base score 4.3 (Medium). Vector: AV:N/AC:M/Au:N/C:N/I:P/A:N. This CVE predates CVSS v3 and has no v3 score from NVD.

EPSS exploit prediction

EPSS: 0.065 (93.5th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 94th percentile — 93.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2009-4142: held from 0.065 to 0.065.

EPSS over last 30 days · oldest: 0.065 · newest: 0.065 · change: 0.000

Affected products

  • PHP — versions 1.0, 2.0, 2.0b10

Weakness classification (CWE)

References