CakePHP <= 1.3.5/ 1.2.8: unserialize() Vulnerability

Users of CakePHP <= 1.3.5 /1.2.8 please be advised of an unserialize() vulnerability that has been identified.
To view this vulnerability, possible remedies, and others please check out the Security Advisories at Critical Watch (

CakePHP-SA-11/14/2010: CakePHP <= 1.3.5 / 1.2.8 unserialize() Vulnerability
CakePHP is vulnerable to a file inclusion attack because of its use of
“unserialize()” function on unchecked user input. This makes it possible
to inject arbitary objects into the scope.
The $check array contains our POST data and $locked is
a simple (rot-13 obfuscated) serialized string, which is completely
under our control.

PHP5 introduces a destructor with the “__destruct” method. Each object
will execute its __destruct method at the end of its lifetime and we can
use this to turn an unchecked unserialize() call in an useful exploit.
(See Stefan Essers talk @
for more information)