Bug 548516 - (CVE-2009-4142) CVE-2009-4142 php: htmlspecialchars() insufficient checking of input for multi-byte encodings
CVE-2009-4142 php: htmlspecialchars() insufficient checking of input for mult...
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 541594 541595 541596 541597 541598 552268
  Show dependency treegraph
Reported: 2009-12-17 12:12 EST by Vincent Danen
Modified: 2013-04-12 01:03 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-04-12 01:03:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Upstream patch in 5.2 branch (9.73 KB, patch)
2009-12-18 09:37 EST, Tomas Hoger
no flags Details | Diff

  None (edit)
Description Vincent Danen 2009-12-17 12:12:09 EST
PHP 5.2.12 was released with the following reference:

Fixed bug #49785 (insufficient input string validation of htmlspecialchars()). (CVE-2009-4142, Moriyoshi, hello at iwamot dot com)

A little more detail is available in upstream's bug report: http://bugs.php.net/bug.php?id=49785
Comment 1 Tomas Hoger 2009-12-18 09:13:53 EST
As reported in the upstream bug, incorrect handling of invalid multi-byte sequences in htmlspecialchars() can allow XSS attacks caused by insufficient escaping of the inputs when certain encodings are used.

This flaw affects PHP versions in all currently supported Red Hat Enterprise Linux versions (3, 4, 5).

Fixed is committed in upstream 5.3 SVN branch, but is not yet included in the latest released 5.3 version (5.3.1).
Comment 2 Tomas Hoger 2009-12-18 09:18:52 EST
Related upstream SVN commits: 289411, 289554, 289565, 289567, 289605, 291821

File with tests:
Comment 3 Tomas Hoger 2009-12-18 09:37:21 EST
Created attachment 379223 [details]
Upstream patch in 5.2 branch

svn diff -r 272374:291821 http://svn.php.net/repository/php/php-src/branches/PHP_5_2/ext/standard/html.c
Comment 11 errata-xmlrpc 2010-01-13 13:10:16 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 3

Via RHSA-2010:0040 https://rhn.redhat.com/errata/RHSA-2010-0040.html
Comment 12 Fedora Update System 2010-01-31 20:09:22 EST
php-5.2.12-1.fc11, maniadrive-1.2-17.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.