SimpleSAMLphp saml2 incorrect signature validation
The advisory, in context
HTTPRedirect.php in the saml2 library in SimpleSAMLphp before 1.15.4 has an incorrect check of return values in the signature validation utilities, allowing an attacker to get invalid signatures accepted as valid by forcing an error during validation. This occurs because of a dependency on PHP functionality that interprets a -1 error code as a true boolean value.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 1.10.6
Fixed in 1.10.6
45 explicitly affected versions
v0.1.0, v0.1.0-alpha, v0.3.0, v0.4.0, v0.4.1, v0.4.2, v0.5.0, v0.6.0, v0.6.1, v0.6.2, v0.6.3, v0.6.4, v0.7.0, v0.7.1, v0.8.0, v0.8.1, v1.0.0, v1.1.0, v1.10, v1.10.1, v1.10.2, v1.10.3, v1.10.4, v1.10.5, v1.2.0, v1.3.0, v1.3.1, v1.3.2, v1.4.0, v1.5.0, v1.5.1, v1.5.2, v1.5.3, v1.5.4, v1.6.0, v1.6.1, v1.7.0, v1.7.1, v1.7.2, v1.8, v1.8.1, v1.8.2, v1.9, v1.9.1, v1.9.2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.10.6"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v0.1.0",
"v0.1.0-alpha",
"v0.3.0",
"v0.4.0",
"v0.4.1",
"v0.4.2",
"v0.5.0",
"v0.6.0",
"v0.6.1",
"v0.6.2",
"v0.6.3",
"v0.6.4",
"v0.7.0",
"v0.7.1",
"v0.8.0",
"v0.8.1",
"v1.0.0",
"v1.1.0",
"v1.10",
"v1.10.1",
"v1.10.2",
"v1.10.3",
"v1.10.4",
"v1.10.5",
"v1.2.0",
"v1.3.0",
"v1.3.1",
"v1.3.2",
"v1.4.0",
"v1.5.0",
"v1.5.1",
"v1.5.2",
"v1.5.3",
"v1.5.4",
"v1.6.0",
"v1.6.1",
"v1.7.0",
"v1.7.1",
"v1.7.2",
"v1.8",
"v1.8.1",
"v1.8.2",
"v1.9",
"v1.9.1",
"v1.9.2"
]
}From 2.0 before 2.3.8
Fixed in 2.3.8
12 explicitly affected versions
v2.0.0, v2.0.1, v2.1, v2.2, v2.3, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0"
},
{
"fixed": "2.3.8"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v2.0.0",
"v2.0.1",
"v2.1",
"v2.2",
"v2.3",
"v2.3.1",
"v2.3.2",
"v2.3.3",
"v2.3.4",
"v2.3.5",
"v2.3.6",
"v2.3.7"
]
}From 3.0 before 3.1.4
Fixed in 3.1.4
8 explicitly affected versions
v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.1.0, v3.1.1, v3.1.2, v3.1.3
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "3.0"
},
{
"fixed": "3.1.4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.0.3",
"v3.1.0",
"v3.1.1",
"v3.1.2",
"v3.1.3"
]
}References
- https://nvd.nist.gov/vuln/detail/CVE-2018-7711
- https://github.com/simplesamlphp/saml2/commit/4f6af7f69f29df8555a18b9bb7b646906b45924d
- https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/saml2/CVE-2018-7711.yaml
- https://lists.debian.org/debian-lts-announce/2018/03/msg00017.html
- https://simplesamlphp.org/security/201803-01