CWE
502
Advisory Published
CVE Published
Updated

CVE-2020-15148: Unsafe deserialization in Yii 2

First published: Mon Sep 14 2020(Updated: )

### Impact Remote code execution in case application calls `unserialize()` on user input containing specially crafted string. ### Patches 2.0.38 ### Workarounds Add the following to BatchQueryResult.php: ```php public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); } public function __wakeup() { throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); } ``` ### For more information If you have any questions or comments about this advisory, [contact us through security form](https://www.yiiframework.com/security).

Credit: security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
composer/yiisoft/yii2<2.0.38
Yiiframework Yii<2.0.38
composer/yiisoft/yii2<2.0.38
2.0.38
<2.0.38

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the vulnerability ID of this issue?

    The vulnerability ID is CVE-2020-15148.

  • What is the severity of CVE-2020-15148?

    The severity of CVE-2020-15148 is critical.

  • What is the affected software of CVE-2020-15148?

    The affected software of CVE-2020-15148 is Yii 2 (yiisoft/yii2) before version 2.0.38.

  • How does CVE-2020-15148 work?

    CVE-2020-15148 allows remote code execution by calling `unserialize()` on arbitrary user input.

  • How can I fix CVE-2020-15148?

    To fix CVE-2020-15148, upgrade to version 2.0.38 of Yii 2 (yiisoft/yii2) or apply the suggested workaround in the linked advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203