CVE-2014-8626: Buffer Overflow
Stack-based buffer overflow in the datefromISO8601 function in ext/xmlrpc/libxmlrpc/xmlrpc.c in PHP before 5.2.7 allows remote attackers to cause a denial of service (application crash) or possibly execute arbitrary code by including a timezone field in a date, leading to improper XML-RPC encoding.
Other sources
While investigating the CVE-2014-3668 issue (bug 1154503), it was discovered that older PHP versions are affected by another issue in the ISO8601 date format parsing code. The internal datefromISO8601() function failed to check buffer boundary when copying input string to a local fixed sized buffer.
http://git.php.net/?p=php-src.git;a=blob;f=ext/xmlrpc/libxmlrpc/xmlrpc.c;h=d82f270#l164
This leads to a stack based buffer overflow. A PHP application that uses the PHP xmlrpc extension (in Red Hat Enterprise Linux and Fedora, this extension is available via separate php-xmlrpc package) to implement an XML-RPC server (or client) could crash or, possibly, execute arbitrary code while parsing a specially crafted XML-RPC request.
This problem was fixed upstream in PHP version 5.2.7 via:
http://git.php.net/?p=php-src.git;a=commitdiff;h=c818d0d https://bugs.php.net/bug.php?id=45226
The actual impact of the fix was apparently not realized upstream, as the fix was only listed as a bug fix, rather than security fix, in the upstream ChangeLog:
http://php.net/ChangeLog-5.php#5.2.7
Fixed bugs #45226, #18916 (xmlrpcsettype() segfaults and wrong behavior with valid ISO8601 date string). (Jeff Lawsons)
Impact of this issue is mitigated on Red Hat Enterprise Linux 5, where php packages are built with the Stack Protector protection, which lead to early detection of the overflow, leading to application abort before the overwritten saved instruction pointer is used. The php packages in Red Hat Enterprise Linux 4 are not built with the Stack Protector protection to mitigate the code execution impact.
The php packages in Red Hat Enterprise Linux 6 and later, as well as php53 packages in Red Hat Enterprise Linux 5 are based on the fixed upstream version and were not affected by this issue.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2014-8626?
CVE-2014-8626 has a severity level that can lead to denial of service or potentially arbitrary code execution.
How do I fix CVE-2014-8626?
To fix CVE-2014-8626, upgrade PHP to version 5.2.7 or later.
Which versions of PHP are affected by CVE-2014-8626?
CVE-2014-8626 affects PHP versions prior to 5.2.7, including 5.2.0 to 5.2.6.
Can CVE-2014-8626 be exploited remotely?
Yes, CVE-2014-8626 can be exploited remotely by attackers through crafted XML-RPC requests.
What is the impact of CVE-2014-8626 on applications?
The impact of CVE-2014-8626 includes potential application crashes and the risk of arbitrary code execution.