VYPR
Critical severity9.8NVD Advisory· Published Sep 19, 2017· Updated May 13, 2026

CVE-2014-8684

CVE-2014-8684

Description

CodeIgniter before 3.0 and Kohana 3.2.3 and earlier and 3.3.x through 3.3.2 make it easier for remote attackers to spoof session cookies and consequently conduct PHP object injection attacks by leveraging use of standard string comparison operators to compare cryptographic hashes.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
codeigniter/frameworkPackagist
< 3.0.03.0.0
kohana/corePackagist
< 3.3.33.3.3

Affected products

4
  • cpe:2.3:a:codeigniter:codeigniter:*:*:*:*:*:*:*:*
    Range: <=2.2.6
  • cpe:2.3:a:kohanaframework:kohana:3.2.3:*:*:*:*:*:*:*+ 2 more
    • cpe:2.3:a:kohanaframework:kohana:3.2.3:*:*:*:*:*:*:*
    • cpe:2.3:a:kohanaframework:kohana:3.3.0:*:*:*:*:*:*:*
    • cpe:2.3:a:kohanaframework:kohana:3.3.1:*:*:*:*:*:*:*

Patches

1
66b409a6da29

Merge pull request #492 from sarciszewski/3.3/develop

https://github.com/kohana/coreWoody GilkMay 13, 2014via ghsa
2 files changed · +23 2
  • classes/Kohana/Cookie.php+1 1 modified
    @@ -71,7 +71,7 @@ public static function get($key, $default = NULL)
     			// Separate the salt and the value
     			list ($hash, $value) = explode('~', $cookie, 2);
     
    -			if (Cookie::salt($key, $value) === $hash)
    +			if (Security::slow_equals(Cookie::salt($key, $value), $hash))
     			{
     				// Cookie signature is valid
     				return $value;
    
  • classes/Kohana/Security.php+22 1 modified
    @@ -81,8 +81,29 @@ public static function token($new = FALSE)
     	 */
     	public static function check($token)
     	{
    -		return Security::token() === $token;
    +		return Security::slow_equals(Security::token(), $token);
     	}
    +	
    +	
    +	
    +	/**
    +	 * Compare two hashes in a time-invariant manner.
    +	 * Prevents cryptographic side-channel attacks (timing attacks, specifically)
    +	 * 
    +	 * @param string $a cryptographic hash
    +	 * @param string $b cryptographic hash
    +	 * @return boolean
    +	 */
    +	public static function slow_equals($a, $b) 
    +	{
    +		$diff = strlen($a) ^ strlen($b);
    +		for($i = 0; $i < strlen($a) AND $i < strlen($b); $i++)
    +		{
    +			$diff |= ord($a[$i]) ^ ord($b[$i]);
    +		}
    +		return $diff === 0; 
    +	}
    +
     
     	/**
     	 * Remove image tags from a string.
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.