{"id":"GHSA-699q-wcff-g9mj","aliases":["CVE-2020-15148"],"title":"Unsafe deserialization in Yii 2","titleSource":"OSV","descriptionSource":"OSV","declaredSeverity":"HIGH","description":"### 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).","severity":"high","score":8.9,"published":"2020-09-15T18:19:56.000Z","modified":"2026-07-08T05:59:36.206Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Packagist","name":"yiisoft/yii2","sources":[{"name":"OSV · GHSA-699q-wcff-g9mj","url":"https://osv.dev/vulnerability/GHSA-699q-wcff-g9mj"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"2.0.38"}],"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.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"],"fixed":["2.0.38"]}],"sourceAffected":[],"references":["https://github.com/yiisoft/yii2/security/advisories/GHSA-699q-wcff-g9mj","https://nvd.nist.gov/vuln/detail/CVE-2020-15148","https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99","https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2020-15148.yaml","https://www.yiiframework.com/news/303/yii-2-0-38"],"sources":[{"name":"OSV","id":"GHSA-699q-wcff-g9mj","modified":"2026-07-08T05:59:36.206828100Z","url":"https://osv.dev/vulnerability/GHSA-699q-wcff-g9mj"}],"assessments":[{"source":"OSV","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H","score":8.9}],"products":[],"remediation":[],"kev":{"status":"not-listed","checkedAt":"2026-10-28T21:15:31.530Z"},"coverage":[{"source":"NVD","status":"not-checked"},{"source":"GHSA","status":"not-checked"},{"source":"EUVD","status":"not-checked"},{"source":"EPSS","status":"not-checked"}],"evidence":[]}