Unauthenticated crypto and weak IV in Magento\Framework\Encryption
The advisory, in context
The __construct function in Framework/Encryption/Crypt.php in Magento 2 uses the PHP rand function to generate a random number for the initialization vector, which makes it easier for remote attackers to defeat cryptographic protection mechanisms by guessing the 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.
From 2.0 before 2.2.6
Fixed in 2.2.6
49 explicitly affected versions
2.0.0, 2.0.0-rc, 2.0.0-rc2, 2.0.1, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.0.15, 2.0.16, 2.0.17, 2.0.18, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.0-rc1, 2.1.0-rc2, 2.1.0-rc3, 2.1.1, 2.1.10, 2.1.11, 2.1.12, 2.1.13, 2.1.14, 2.1.15, 2.1.16, 2.1.17, 2.1.18, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0"
},
{
"fixed": "2.2.6"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.0.0",
"2.0.0-rc",
"2.0.0-rc2",
"2.0.1",
"2.0.10",
"2.0.11",
"2.0.12",
"2.0.13",
"2.0.14",
"2.0.15",
"2.0.16",
"2.0.17",
"2.0.18",
"2.0.2",
"2.0.3",
"2.0.4",
"2.0.5",
"2.0.6",
"2.0.7",
"2.0.8",
"2.0.9",
"2.1.0",
"2.1.0-rc1",
"2.1.0-rc2",
"2.1.0-rc3",
"2.1.1",
"2.1.10",
"2.1.11",
"2.1.12",
"2.1.13",
"2.1.14",
"2.1.15",
"2.1.16",
"2.1.17",
"2.1.18",
"2.1.2",
"2.1.3",
"2.1.4",
"2.1.5",
"2.1.6",
"2.1.7",
"2.1.8",
"2.1.9",
"2.2.0",
"2.2.1",
"2.2.2",
"2.2.3",
"2.2.4",
"2.2.5"
]
}From 2.0 through 2.0.2 (inclusive)
No fix recorded for this interval.
5 explicitly affected versions
2.0.0, 2.0.0-rc, 2.0.0-rc2, 2.0.1, 2.0.2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0"
},
{
"last_affected": "2.0.2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.0.0",
"2.0.0-rc",
"2.0.0-rc2",
"2.0.1",
"2.0.2"
]
}References
- https://nvd.nist.gov/vuln/detail/CVE-2016-6485
- https://github.com/magento/magento2/pull/15017
- https://github.com/FriendsOfPHP/security-advisories/blob/master/magento/product-community-edition/CVE-2016-6485.yaml
- http://www.openwall.com/lists/oss-security/2016/07/19/3
- http://www.openwall.com/lists/oss-security/2016/07/27/14