{"id":"CVE-2020-15148","aliases":["GHSA-699q-wcff-g9mj"],"url":"https://o3.security/vulnerability/CVE-2020-15148","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).","published":"2020-09-15T19:15:12.963Z","modified":"2026-08-07T15:11:47.330105Z","cvss":{"score":10,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"},"epss":{"score":0.78759,"percentile":0.99572,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":4,"affectedPackages":[{"ecosystem":"Packagist","name":"yiisoft/yii2","fixedVersion":"2.0.38"}],"fix":{"url":"https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99","label":"yiisoft/yii2@9abccb9"},"references":[{"type":"ADVISORY","url":"https://github.com/yiisoft/yii2/security/advisories/GHSA-699q-wcff-g9mj"},{"type":"FIX","url":"https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15148"},{"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-07T15:11:47.330105Z"}}