mailing list archives
Re: [CVE-2014-1860] PHP object insertion / possible RCE in Contao CMS <= 3.2.4
From: Egidio Romano <research () karmainsecurity com>
Date: Sat, 08 Feb 2014 14:30:45 +0100
Rest assured, it wasn't my intention to get into a flame war! :)
The thing is that I am one of that kind of people that is called "like
San Tommaso" in Italy. In other words, I'm not able to believe in
something until I can see it with my eyes. Well, now Stefan Esser has
provided a PoC for CVE-2014-1860 , proving that I was wrong. Sadly,
I'm just a human being, and as everybody knows, "errare humanum est".
I just hope that now he is happy to have proven to be smarter than me.
On the other hand, just because his PHP exploitation skills are better
than mine, it doesn't necessarily mean he's smarter than me, especially
considering the fact that he is part of the PHP development team.
However, I never thought to be such a smart guy, and very likely he is
actually smarter than me.
So, it seems I need to apologize to Pedro Ribeiro: please accept my
apologies for doubting about the validity of your report. Nevertheless,
if we want to be picky, actually your report is only 33.3% true, since
you reported two deserialize()s called with user input accessed via the
Input::post method (which seems to be not vulnerable), and only one via
the Input::postRaw method, that is what I missed, and this made me
think it wasn't exploitable.
Finally, I really would like to congratulate with Mr. Esser, since he
claims  to be aware of this security hole for (who knows how many)
years. However it seems he preferred to keep this as 0-day, instead of
reporting to the Contao team and help to improve the security of an
open source project.
Have a great weekend!
On 07/02/2014 11:46, Mario Vilas wrote:
I haven't read the whole thread, so I apologize in advance for
commenting on it. But I think it's important to mention that "not a
vulnerability" and "not exploitable" are entirely different concepts.
Since conclusively proving that a vulnerability is 100% not exploitable
for all code paths in all possible environments is difficult at best (if
not downright impossible), you can still consider something a
vulnerability even if you don't have a proof of concept - you can assign
it lower risk, of course, but it doesn't disappear, because there's at
least a theoretical possibility that it may be exploited.
So, let's not get into a flame war yet. :)
On Fri, Feb 7, 2014 at 12:15 AM, Egidio Romano wrote:
today a little bird known as "i0n1c" twitted something about me ,
claiming that I was wrong, and that CVE-2014-1860 could actually be
exploited, "because there is S: which allows encoded NUL bytes" , and
that's true in part. So, instead of using a string like this:
An attacker might be able to bypass the filter implemented within the
Input::xssClean() method because she can also use a string like this:
The Input::xssClean() method removes not only NULL bytes, but also the
string "\0", meaning that the above string will be converted to:
Of course this could easily be bypassed using a string like this:
However, in such case there's another filter which doesn't allow to
inject *protected* or *private* objects' properties, and that is
implemented within the Input::encodeSpecialChars() method , which
converts backslashes into "\", meaning that the above string will be
Therefore, unless somebody (like Pedro Ribeiro or Mr. Stefan Esser)
provides a working Proof of Concept, I will continue to believe that
CVE-2014-1860 should be rejected as non-vulnerability.
> On Wed, Feb 05, 2014 at 11:13:29PM +0100, Egidio Romano wrote:
> I believe this CVE should be rejected, because the vulnerabilities
> actually don't exist, at least the ones mentioned in this report.
> The reason is that user input is passed to the unserialize() function
> through the Contao Input class, in which the Input::xssClean() method
> removes all the NULL bytes from user input, meaning that an
> be able to manipulate only the *public* properties of the injected
> objects, because *protected* and *private* properties of a serialized
> object are encoded with NULL bytes.
> I haven't found any exploitable magic method in Contao which uses only
> *public* properties, and the ones mentioned in the original report are
> exploitable only through *protected* properties.
> Therefore, unless someone provides a working Proof of Concept, I think
> these shouldn't be considered actual security vulnerabilities.
> Best Ragards,
> Egidio Romano
>> I have discovered a vulnerability that might lead to code
>> Contao CMS <= 3.2.4
>> Contao CMS <= 3.2.4 does not properly validate user input in several
>> locations which is then passed directly into PHP's unserialize.
>> This has been fixed in Contao 3.2.5 as per commit:
>> Announcements can be found at
>> Thanks to the Contao developers for being so responsive.
>> The full report can be found at my repo in
>> Pedro Ribeiro
>> Agile Information Security
Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia - http://secunia.com/