GHSA-699q-wcff-g9mjhigh8.9
Unsafe deserialization in Yii 2
Impact
Remote code execution in case application calls unserialize() on user input containing specially crafted string.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
yiisoft/yii2 Packagist
| Affected range | Recorded fix |
|---|---|
| Earlier releases before 2.0.38Ecosystem versions | 2.0.38 |
Version evidence: OSV · GHSA-699q-wcff-g9mj
View original version evidence (52 explicit versions)
Original source description
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:
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.
References
- Security advisory github.com/yiisoft/yii2/security/advisories/GHSA-699q-wcff-g9mj
- Security advisory nvd.nist.gov/vuln/detail/CVE-2020-15148
- Patch github.com/yiisoft/yii2/commit/9abccb96d7c5ddb569f92d1a748f50ee9b3e2b99
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/yiisoft/yii2/CVE-2020-15148.yaml
- Source reference www.yiiframework.com/news/303/yii-2-0-38