{"id":"CVE-2020-15148","aliases":["CVE-2020-15148","GHSA-699q-wcff-g9mj"],"related":[],"kind":"vulnerability","state":"published","title":"Unsafe deserialization in Yii 2","summary":"Yii 2 (yiisoft/yii2) before version 2.0.38 is vulnerable to remote code execution if the application calls `unserialize()` on arbitrary user input. This is fixed in version 2.0.38. A possible workaround without upgrading is available in the linked advisory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Yii 2 (yiisoft/yii2) before version 2.0.38 is vulnerable to remote code execution if the application calls `unserialize()` on arbitrary user input. This is fixed in version 2.0.38. A possible workaround without upgrading is available in the linked advisory.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Yii 2 (yiisoft/yii2) versiones anteriores a 2.0.38 es vulnerable a una Ejecución de Código Remota si la aplicación llama a \"unserialize()\" en una entrada arbitraria de usuario.&#xa0;Esto es corregido en la versión 2.0.38.&#xa0;Una posible solución alternativa sin actualización está disponible en el aviso vinculado","source":"nvd"}],"published":"2020-09-15T18:19:56.000Z","modified":"2026-07-08T05:59:36.206Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H","score":8.9,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H","score":8.9,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-502"],"affected":[{"ranges":[{"version":"< 2.0.38","status":"affected"}],"vendor":"yiisoft","product":"yii2","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.0.38"}],"ecosystem":"Packagist","package":"yiisoft/yii2","purl":"pkg:composer/yiisoft/yii2","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.0.38"}],"vendor":"yiiframework","product":"yii","cpe":"cpe:2.3:a:yiiframework:yii:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/yiisoft/yii2/security/advisories/GHSA-699q-wcff-g9mj","tags":["mitigation","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15148","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2020-15148.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://www.yiiframework.com/news/303/yii-2-0-38","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-15148","url":"https://www.cve.org/CVERecord?id=CVE-2020-15148","licence":"CVE Terms of Use","modified":"2024-08-04T13:08:21.907Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-699q-wcff-g9mj","url":"https://github.com/advisories/GHSA-699q-wcff-g9mj","licence":"CC-BY-4.0","modified":"2026-07-08T05:59:36.206Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-15148","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15148","licence":"Public domain","modified":"2026-06-17T02:56:08.787Z"}],"updatedAt":"2026-11-25T22:57:54.718Z","epss":{"score":0.77538,"percentile":0.99566,"date":"2026-12-01T12:00:22.000Z"}}