CVE-2020-15148: Unsafe deserialization in Yii 2

Published 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.

Other sources

Possible remote code execution via unserialize() on user input containing specially crafted string

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.

Affected Software

3 affected componentsFixes available
composer/yiisoft/yii2<2.0.38
composer/yiisoft/yii2<2.0.38
2.0.38
Yiiframework Yii<2.0.38

Event History

Sep 14, 2020
Advisory Published
09:15 PM
Sep 15, 2020
CVE Published
via MITRE·06:25 PM
Data Sourced
via MITRE·06:25 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID of this issue?

The vulnerability ID is CVE-2020-15148.

2

What is the severity of CVE-2020-15148?

The severity of CVE-2020-15148 is critical.

3

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.

4

How does CVE-2020-15148 work?

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

5

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203