|
PHP "strip_tags()" Function and memory_limit Vulnerabilities
|
|
|
|
|
Secunia Advisory:
|
SA12064
|
|
|
Release Date:
|
2004-07-14
|
|
|
Critical:
|

Highly critical
|
|
Impact:
|
Security Bypass System access
|
|
Where:
|
From remote
|
|
Solution Status:
|
Vendor Patch
|
|
| Software: | PHP 4.0.x PHP 4.1.x PHP 4.2.x PHP 4.3.x
|
| | CVE reference: | CVE-2004-0594 (Secunia mirror) CVE-2004-0595 (Secunia mirror)
|
|
|
Want to know the next time vulnerabilities are fixed in this product? - Companies can be alerted via email and SMS! |
|
|
Description: Stefan Esser has reported two vulnerabilities in PHP, which can be exploited by malicious people to bypass certain security functionality or compromise a vulnerable system.
1) The "strip_tags()" function fails to strip obfuscated HTML tags (e.g. tags with "\0"). This can be exploited to conduct cross-site scripting attacks against sites, which only rely on the "strip_tags()" functionality to prevent such attacks.
NOTE: An HTML tag such as "<script>" with an embedded binary character like "\0" is not a valid HTML entity. However, certain browsers such as Internet Explorer and Safari strip such illegal characters and render it. This is not a vulnerability in those browser, but unfortunate and unnecessary functionality.
2) Various errors within PHP's memory_limit request termination (e.g. when allocating Zend HashTables before proper initialisation) can be exploited to execute arbitrary code by corrupting the heap (e.g. supplying arbitrary HashTable destructor pointers).
Successful exploitation requires that a resource limit has been set via the "memory_limit" configuration directive.
The vulnerabilities have been reported in version 4.3.7 and prior and version 5.0.0RC3 and prior.
Do you have this product installed on your home computer? Scan using the free Personal Software Inspector. Check if a vulnerable version is installed on computers in your corporate network, scan using the Network Software Inspector.
Solution: The vulnerabilities have been fixed in version 4.3.8.
http://www.php.net/downloads.php
Provided and/or discovered by: Stefan Esser, e-matters.
Original Advisory: Stefan Esser:
http://security.e-matters.de/advisories/112004.html
http://security.e-matters.de/advisories/122004.html
PHP:
http://www.php.net/release_4_3_8.php
|
|
|
|
|
Please note: The information that this Secunia Advisory is based on comes from a third party unless stated otherwise.
Secunia collects, validates, and verifies all vulnerability reports issued by security research groups, vendors, and others.
|
|
|
|
25 Related Secunia Security Advisories, displaying 10
|
|
|
1. PHP "gdPngReadData()" Truncated PNG Data Denial of Service
|
|
2. PHP "readwbmp()" Integer Overflow Vulnerability
|
|
3. PHP "htmlentities()" and "htmlspecialchars()" Buffer Overflows
|
|
4. PHP "ini_restore()" Security Bypass Vulnerability
|
|
5. PHP "open_basedir" Symlink Security Bypass Vulnerability
|
|
6. PHP "wordwrap()" Buffer Overflow Vulnerability
|
|
7. PHP "phpinfo()" Cross-Site Scripting and Security Bypass
|
|
8. PHP "html_entity_decode()" Information Disclosure Vulnerability
|
|
9. PHP "mb_send_mail()" and IMAP Functions Security Bypass
|
|
10. PHP "mysql_connect" Buffer Overflow Vulnerability
|
Show all related advisories
|
|
|
Send Feedback to Secunia
|
|
If you have new information regarding this Secunia advisory or a product in our database, please send it to us using either our web form or email us at vuln@secunia.com.
Ideas, suggestions, and other feedback are most welcome.
|
|
|
|