Yii Framework Cross-Site Request Forgery (CSRF)
The advisory, in context
In Yii Framework 2.x before 2.0.14, the switchIdentity function in web/User.php did not regenerate the CSRF token upon a change of identity.
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.0.14
Fixed in 2.0.14
24 explicitly affected versions
2.0.0, 2.0.0-alpha, 2.0.0-beta, 2.0.0-rc, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0"
},
{
"fixed": "2.0.14"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.0.0",
"2.0.0-alpha",
"2.0.0-beta",
"2.0.0-rc",
"2.0.1",
"2.0.10",
"2.0.11",
"2.0.11.1",
"2.0.11.2",
"2.0.12",
"2.0.12.1",
"2.0.12.2",
"2.0.13",
"2.0.13.1",
"2.0.13.2",
"2.0.13.3",
"2.0.2",
"2.0.3",
"2.0.4",
"2.0.5",
"2.0.6",
"2.0.7",
"2.0.8",
"2.0.9"
]
}From 2.0 before 2.0.14
Fixed in 2.0.14
24 explicitly affected versions
2.0.0, 2.0.0-alpha, 2.0.0-beta, 2.0.0-rc, 2.0.1, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.12.1, 2.0.12.2, 2.0.13, 2.0.13.1, 2.0.13.2, 2.0.13.3, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "2.0"
},
{
"fixed": "2.0.14"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.0.0",
"2.0.0-alpha",
"2.0.0-beta",
"2.0.0-rc",
"2.0.1",
"2.0.10",
"2.0.11",
"2.0.11.1",
"2.0.11.2",
"2.0.12",
"2.0.12.1",
"2.0.12.2",
"2.0.13",
"2.0.13.1",
"2.0.13.2",
"2.0.13.3",
"2.0.2",
"2.0.3",
"2.0.4",
"2.0.5",
"2.0.6",
"2.0.7",
"2.0.8",
"2.0.9"
]
}References
- https://nvd.nist.gov/vuln/detail/CVE-2018-6009
- https://github.com/yiisoft/yii2/commit/6c0540aa2d6e0fe0fa89e4fd35bba4be5d6cece7
- https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2-dev/CVE-2018-6009.yaml
- https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2018-6009.yaml
- https://github.com/yiisoft/yii2-framework
- https://www.yiiframework.com/news/165/yii-2-0-14-is-released