{"id":"GHSA-699q-wcff-g9mj","summary":"Unsafe deserialization in Yii 2","details":"### Impact\n\nRemote code execution in case application calls `unserialize()` on user input containing specially crafted string.\n\n### Patches\n\n2.0.38\n\n### Workarounds\n\nAdd the following to BatchQueryResult.php:\n\n```php\npublic function __sleep()\n{\n    throw new \\BadMethodCallException('Cannot serialize '.__CLASS__);\n}\n\npublic function __wakeup()\n{\n    throw new \\BadMethodCallException('Cannot unserialize '.__CLASS__);\n}\n```\n\n### For more information\n\nIf you have any questions or comments about this advisory, [contact us through security form](https://www.yiiframework.com/security).","aliases":["CVE-2020-15148"],"modified":"2026-07-08T05:59:36.206828100Z","published":"2020-09-15T18:19:56Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2020-09-15T18:19:44Z","nvd_published_at":null,"cwe_ids":["CWE-502"]},"references":[{"type":"WEB","url":"https://github.com/yiisoft/yii2/security/advisories/GHSA-699q-wcff-g9mj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15148"},{"type":"WEB","url":"https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2020-15148.yaml"},{"type":"WEB","url":"https://www.yiiframework.com/news/303/yii-2-0-38"}],"affected":[{"package":{"name":"yiisoft/yii2","ecosystem":"Packagist","purl":"pkg:composer/yiisoft/yii2"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.0.38"}]}],"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.14","2.0.14.1","2.0.14.2","2.0.15","2.0.15.1","2.0.16","2.0.16.1","2.0.17","2.0.18","2.0.19","2.0.2","2.0.20","2.0.21","2.0.22","2.0.23","2.0.24","2.0.25","2.0.26","2.0.27","2.0.28","2.0.29","2.0.3","2.0.30","2.0.31","2.0.32","2.0.33","2.0.34","2.0.35","2.0.36","2.0.37","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8","2.0.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-699q-wcff-g9mj/GHSA-699q-wcff-g9mj.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H"}]}