Joomla! <= 3.0.3 (remember.php) PHP Object Injection Vulnerability

• Software Link:

• Affected Versions:

Version 3.0.3 and earlier 3.0.x versions.
Version 2.5.9 and earlier 2.5.x versions.

• Vulnerability Description:

The vulnerable code is located in /plugins/system/remember/remember.php:

			$hash = JApplication::getHash('JLOGIN_REMEMBER');

			if ($str = JRequest::getString($hash, '', 'cookie', JREQUEST_ALLOWRAW | JREQUEST_NOTRIM))
				// Create the encryption key, apply extra hardening using the user agent string.
				// Since we're decoding, no UA validity check is required.
				$privateKey = JApplication::getHash(@$_SERVER['HTTP_USER_AGENT']);

				$key = new JCryptKey('simple', $privateKey, $privateKey);
				$crypt = new JCrypt(new JCryptCipherSimple, $key);
				$str = $crypt->decrypt($str);
				$cookieData = @unserialize($str);

User input passed through cookies is not properly sanitized before being used in an unserialize()
call at line 45. This could be exploited to inject arbitrary PHP objects into the application scope.
Successful exploitation of this vulnerability requires authentication because the attacker needs
to know the “hash string” used to read the cookie parameter at line 36.

• Solution:

Upgrade to version 2.5.10, 3.0.4 or 3.1.0.

• Disclosure Timeline:

[04/12/2012] – Vendor alerted for a possible vulnerability
[13/02/2013] – Vulnerability confirmed and proof of concept sent to the vendor
[24/04/2013] – Vendor update released
[26/04/2013] – Public disclosure

• CVE Reference:

The Common Vulnerabilities and Exposures project (
has assigned the name CVE-2013-3242 to this vulnerability.

• Credits:

Vulnerability discovered by Egidio Romano.