Bug 548516 (CVE-2009-4142) - CVE-2009-4142 php: htmlspecialchars() insufficient checking of input for multi-byte encodings
Summary: CVE-2009-4142 php: htmlspecialchars() insufficient checking of input for mult...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2009-4142
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://web.nvd.nist.gov/view/vuln/det...
Whiteboard:
Depends On: 541594 541595 541596 541597 541598 552268
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-17 17:12 UTC by Vincent Danen
Modified: 2019-09-29 12:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-12 05:03:24 UTC
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0040 0 normal SHIPPED_LIVE Moderate: php security update 2010-01-13 18:09:32 UTC

Description Vincent Danen 2009-12-17 17:12:09 UTC
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 14:13:53 UTC
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 14:18:52 UTC
Related upstream SVN commits: 289411, 289554, 289565, 289567, 289605, 291821

File with tests:
http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/tests/strings/bug49785.phpt

Comment 3 Tomas Hoger 2009-12-18 14:37:21 UTC
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 18:10:16 UTC
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-02-01 01:09:22 UTC
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.