CVE-2018-6009
Yii Framework Cross-Site Request Forgery (CSRF)
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
8.8
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.
- Record
CVE-2018-6009- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV:N/AC:M/Au:N/C:P/I:P/A:P - Weakness
- CWE-352
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2018-6009- Updated
- 2026-11-02
EUVDEUVD-2022-3649 No score
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.
- Record
EUVD-2022-3649- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-cwhm-272p-3wj9
8.8
Yii Framework Cross-Site Request Forgery (CSRF)
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.
- Record
GHSA-cwhm-272p-3wj9- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-352
- Updated
- 2026-11-02
OSV
8.8
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.
- Record
CVE-2018-6009- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-cwhm-272p-3wj9
8.8
Yii Framework Cross-Site Request Forgery (CSRF)
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.
- Record
GHSA-cwhm-272p-3wj9- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-352
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
yiisoft/yii2Packagist |
2.0 up to 2.0.14 | 2.0.14 |
yiisoft/yii2-devPackagist |
2.0 up to 2.0.14 | 2.0.14 |
yiisoft/yii2Packagist |
2.0 up to 2.0.14, plus listed versions 2.0.02.0.0-alpha2.0.0-beta2.0.0-rc2.0.1 Show 19 moreShow less2.0.102.0.112.0.11.12.0.11.22.0.122.0.12.12.0.12.22.0.132.0.13.12.0.13.22.0.13.32.0.22.0.32.0.42.0.52.0.62.0.72.0.82.0.9 |
2.0.14 |
yiisoft/yii2-devPackagist |
2.0 up to 2.0.14, plus listed versions 2.0.02.0.0-alpha2.0.0-beta2.0.0-rc2.0.1 Show 19 moreShow less2.0.102.0.112.0.11.12.0.11.22.0.122.0.12.12.0.12.22.0.132.0.13.12.0.13.22.0.13.32.0.22.0.32.0.42.0.52.0.62.0.72.0.82.0.9 |
2.0.14 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2018-6009 is a high vulnerability (CVSS 8.8) in Yiiframework, published January 22, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.60%, the 48th percentile. Fixed in yiisoft/yii2 2.0.14.
References
github.com/yiisoft/yii2/commit/6c0540aa2d6e0fe0fa89e4fd35bba4be5d6cece7
nvd.nist.gov/vuln/detail/CVE-2018-6009
github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2-dev/CVE-2018-6009.yaml
github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2018-6009.yaml
yiiframework.com/news/165/yii-2-0-14-is-released
github.com/advisories/GHSA-cwhm-272p-3wj9
github.com/yiisoft/yii2-framework