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

CVE-2017-12868

CVE-2017-12868

Description

The secureCompare method in lib/SimpleSAML/Utils/Crypto.php in SimpleSAMLphp 1.14.13 and earlier, when used with PHP before 5.6, allows attackers to conduct session fixation attacks or possibly bypass authentication by leveraging missing character conversions before an XOR operation.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
simplesamlphp/simplesamlphpPackagist
>= 1.14.12, < 1.14.141.14.14

Affected products

1

Patches

1
4bc629658e7b

bugfix: SimpleSAML\Utils\Crypto returns true for different strings using PHP < 5.6.

https://github.com/simplesamlphp/simplesamlphpJaime Pérez CrespoMay 5, 2017via ghsa
1 file changed · +2 2
  • lib/SimpleSAML/Utils/Crypto.php+2 2 modified
    @@ -404,8 +404,8 @@ public static function secureCompare($known, $user)
                 return false; // length differs
             }
             $diff = 0;
    -        for ($i = 0; $i < $len; ++$i) {
    -            $diff |= $known[$i] ^ $user[$i];
    +        for ($i = 0; $i < $len; $i++) {
    +            $diff |= ord($known[$i]) ^ ord($user[$i]);
             }
             // if all the bytes in $a and $b are identical, $diff should be equal to 0
             return $diff === 0;
    

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

7

News mentions

0

No linked articles in our index yet.