Advisory

GHSA-699q-wcff-g9mj

Also known as: CVE-2020-15148

Summary

Unsafe deserialization in Yii 2

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-09-15 18:19 UTC
Modified
2026-07-08 05:59 UTC

Affected packages and fixes

yiisoft/yii2

Packagist · All systems

Affected

  • introduced 0, fixed 2.0.38 (ecosystem)

Fixed versions

2.0.38

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences