Skip to content
Fencer Intel
medium 6.8

CVE-2009-5016 json

Integer overflow in the xml_utf8_decode function in ext/xml/xml.c in PHP before 5.2.11 makes it easier for remote attackers to bypass cross…

published 15y ago modified 4mo ago also EUVD-2009-4974

cvss
6.8
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.7%
EPSS 2.7% chance of exploitation in 30 days, percentile 85%
public exploits
0
none known

Summary

Integer overflow in the xml_utf8_decode function in ext/xml/xml.c in PHP before 5.2.11 makes it easier for remote attackers to bypass cross-site scripting (XSS) and SQL injection protection mechanisms via a crafted string that uses overlong UTF-8 encoding, a different vulnerability than CVE-2010-3870.

Patch / fix

  • php RHEL 6 5.3.2-6.el6_0.1
  • php-gd RHEL 6 5.3.2-6.el6_0.1
  • php-cli RHEL 6 5.3.2-6.el6_0.1
  • php-dba RHEL 6 5.3.2-6.el6_0.1
  • php-pdo RHEL 6 5.3.2-6.el6_0.1
  • php-xml RHEL 6 5.3.2-6.el6_0.1
  • php-zts RHEL 6 5.3.2-6.el6_0.1
  • php-imap RHEL 6 5.3.2-6.el6_0.1

red hat advisories RHSA-2011:0195RHSA-2010:0919

Is CVE-2009-5016 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2009-5016 updated cvss 4.3

php: XSS and SQL injection bypass via crafted overlong UTF-8 encoded string

  • Red Hat Enterprise Linux (v. 5 server) php 5.1.6-27.el5_5.3, php-gd 5.1.6-27.el5_5.3, php-cli 5.1.6-27.el5_5.3, php-dba 5.1.6-27.el5_5.3, php-pdo 5.1.6-27.el5_5.3, php-xml 5.1.6-27.el5_5.3, +12 more Red Hat Enterprise Linux AS version 4 php 4.3.9-3.31, php-gd 4.3.9-3.31, php-imap 4.3.9-3.31, php-ldap 4.3.9-3.31, php-odbc 4.3.9-3.31, php-pear 4.3.9-3.31, +7 more
    fixed: vendor fix RHSA-2010:0919
  • Red Hat Enterprise Linux Desktop Optional (v. 6) php 5.3.2-6.el6_0.1, php-gd 5.3.2-6.el6_0.1, php-cli 5.3.2-6.el6_0.1, php-dba 5.3.2-6.el6_0.1, php-pdo 5.3.2-6.el6_0.1, php-xml 5.3.2-6.el6_0.1, +19 more
    fixed: vendor fix RHSA-2011:0195
  • Red Hat Enterprise Linux Desktop version 4 php 4.3.9-3.31, php-gd 4.3.9-3.31, php-imap 4.3.9-3.31, php-ldap 4.3.9-3.31, php-odbc 4.3.9-3.31, php-pear 4.3.9-3.31, +7 more Red Hat Enterprise Linux Desktop Workstation (v. 5 client) php 5.1.6-27.el5_5.3, php-gd 5.1.6-27.el5_5.3, php-cli 5.1.6-27.el5_5.3, php-dba 5.1.6-27.el5_5.3, php-pdo 5.1.6-27.el5_5.3, php-xml 5.1.6-27.el5_5.3, +12 more Red Hat Enterprise Linux ES version 4 php 4.3.9-3.31, php-gd 4.3.9-3.31, php-imap 4.3.9-3.31, php-ldap 4.3.9-3.31, php-odbc 4.3.9-3.31, php-pear 4.3.9-3.31, +7 more
    fixed: vendor fix RHSA-2010:0919
  • Red Hat Enterprise Linux HPC Node Optional (v. 6) php 5.3.2-6.el6_0.1, php-gd 5.3.2-6.el6_0.1, php-cli 5.3.2-6.el6_0.1, php-dba 5.3.2-6.el6_0.1, php-pdo 5.3.2-6.el6_0.1, php-xml 5.3.2-6.el6_0.1, +19 more Red Hat Enterprise Linux Server (v. 6) php 5.3.2-6.el6_0.1, php-gd 5.3.2-6.el6_0.1, php-cli 5.3.2-6.el6_0.1, php-pdo 5.3.2-6.el6_0.1, php-xml 5.3.2-6.el6_0.1, php-ldap 5.3.2-6.el6_0.1, +6 more Red Hat Enterprise Linux Server Optional (v. 6) php 5.3.2-6.el6_0.1, php-dba 5.3.2-6.el6_0.1, php-zts 5.3.2-6.el6_0.1, php-imap 5.3.2-6.el6_0.1, php-intl 5.3.2-6.el6_0.1, php-snmp 5.3.2-6.el6_0.1, +8 more Red Hat Enterprise Linux Workstation (v. 6) php 5.3.2-6.el6_0.1, php-gd 5.3.2-6.el6_0.1, php-cli 5.3.2-6.el6_0.1, php-pdo 5.3.2-6.el6_0.1, php-xml 5.3.2-6.el6_0.1, php-ldap 5.3.2-6.el6_0.1, +6 more Red Hat Enterprise Linux Workstation Optional (v. 6) php 5.3.2-6.el6_0.1, php-dba 5.3.2-6.el6_0.1, php-zts 5.3.2-6.el6_0.1, php-imap 5.3.2-6.el6_0.1, php-intl 5.3.2-6.el6_0.1, php-snmp 5.3.2-6.el6_0.1, +8 more
    fixed: vendor fix RHSA-2011:0195
  • Red Hat Enterprise Linux WS version 4 php 4.3.9-3.31, php-gd 4.3.9-3.31, php-imap 4.3.9-3.31, php-ldap 4.3.9-3.31, php-odbc 4.3.9-3.31, php-pear 4.3.9-3.31, +7 more
    fixed: vendor fix RHSA-2010:0919

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.65% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • bugs.php.net http://bugs.php.net/bug.php?id=49687 referenced PoC, tagged "exploit" by a source, unverified
  • blackhat.com http://www.blackhat.com/presentations/bh-usa-09/VELANAVA/BHUSA09-VelaNava-FavoriteXSS-SLIDES.pdf referenced PoC, tagged "exploit" by a source, unverified
  • sirdarckcat.blogspot.com http://sirdarckcat.blogspot.com/2009/10/couple-of-unicode-issues-on-php-and.html referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 2.0 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P

Classification

Weakness
Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.