SecurityContext

CVE-2009-4142: PHP - Reflected XSS

  • Cve: CVE-2009-4142
  • Name: PHP - Reflected XSS
  • 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.
  • Impact: Attackers can execute arbitrary scripts in the context of the affected website, leading to data theft or session hijacking.
  • Remediation: Update PHP to version 5.2.12 or later.
  • Vulnerability type: reflected_xss
  • Vulnerability impact: client_script_exec
  • Requirement type: user_interaction
  • Requirements: Attacker needs to send crafted input containing malicious byte sequences.
  • Labels source: projectdiscovery
  • Severity: medium
  • Cvss score: 4.3
  • Cvss vector: CVSS:2.0/AV:N/AC:M/Au:N/C:N/I:P/A:N
  • Epss score: 0.06497
  • Epss percentile: 0.93929
  • Assignee: [email protected]
  • Published at: 2009-12-21T16:30:00Z
  • Age in days: 6182
  • Modified at: 2026-06-16T23:13:07Z
  • Patch available: yes
  • Public exploits total: 2
  • References total: 15
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2009-4142
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
  • Not known: hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

Public exploits

UrlSourceAdded date
http://securitytracker.com/id?1023372nvd2009-12-21
http://www.securityfocus.com/bid/37389nvd2009-12-21

References

Same in every row:

  • Source: nvd
UrlTags
http://www.php.net/ChangeLog-5.phpPatch
http://secunia.com/advisories/37821Vendor Advisory
http://www.vupen.com/english/advisories/2009/3593Vendor Advisory
http://securitytracker.com/id?1023372Exploit
http://www.securityfocus.com/bid/37389Exploit
http://bugs.php.net/bug.php?id=49785
http://lists.apple.com/archives/security-announce/2010//Mar/msg00001.html
http://marc.info/?l=bugtraq&m=127680701405735&w=2
http://secunia.com/advisories/38648
http://secunia.com/advisories/40262

Products

ProductAffectedPlatform boundSourcesUrl
php:php= 2.0b10, <= 5.2.11, = 5.2.10, = 5.2.9, = 5.2.8, = 5.2.6, = 5.2.5, = 5.2.4, = 5.2.3, = 5.2.2, = 5.2.1, = 5.2.0, = 5.1.6, = 5.1.5, = 5.1.4, = 5.1.3, = 5.1.1, = 5.1.0, = 5.0.5, = 5.0.4, = 5.0.3, = 5.0.2, = 5.0.1, = 5.0.0, = 5.0.0 beta1, = 5.0.0 beta2, = 5.0.0 beta3, = 5.0.0 beta4, = 5.0.0 rc1, = 5.0.0 rc2, = 5.0.0 rc3, = 5.0 rc1, = 5.0 rc2, = 5.0 rc3, = 5, = 4.4.9, = 4.4.8, = 4.4.7, = 4.4.6, = 4.4.5, = 4.4.4, = 4.4.3, = 4.4.2, = 4.4.1, = 4.4.0, = 4.3.11, = 4.3.10, = 4.3.9, = 4.3.8, = 4.3.7, = 4.3.6, = 4.3.5, = 4.3.4, = 4.3.3, = 4.3.2, = 4.3.1, = 4.3.0, = 4.2.3, = 4.2.2, = 4.2.1, = 4.2.0, = 4.2, = 4.1.2, = 4.1.1, = 4.1.0, = 4.0.7, = 4.0.7 rc1, = 4.0.7 rc2, = 4.0.7 rc3, = 4.0.7 rc4, = 4.0.6, = 4.0.5, = 4.0.4, = 4.0.4 patch1, = 4.0.3, = 4.0.3 patch1, = 4.0.2, = 4.0.1, = 4.0.1 patch1, = 4.0.1 patch2, = 4.0.0, = 4.0, = 4.0 beta1, = 4.0 beta2, = 4.0 beta3, = 4.0 beta4, = 4.0 beta_4_patch1, = 4.0 rc1, = 4.0 rc2, = 4, = 3.0.18, = 3.0.17, = 3.0.16, = 3.0.15, = 3.0.14, = 3.0.13, = 3.0.12, = 3.0.11, = 3.0.10, = 3.0.9, = 3.0.8, = 3.0.7, = 3.0.6, = 3.0.5, = 3.0.4, = 3.0.3, = 3.0.2, = 3.0.1, = 3.0, = 2.0, = 1.0nonvd/v1/products/php/php

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Public exploit: yes
  • Public exploit count: 2
  • Public exploit first date: 2009-12-21
  • Remote: yes
  • Exposed hosts: 6175026
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports