GHSA-699q-wcff-g9mj is a high-severity (CVSS 8.9) Deserialization of Untrusted Data vulnerability in yiisoft/yii2. 4 public exploit references exist, so weaponization risk is real. A fix is available for yiisoft/yii2 — see the affected versions and patch details below.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-699q-wcff-g9mj by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).
Where this sits among everything scored
Of 385,738 CVEs with a current EPSS score, this one falls in the 50–90% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
yiisoft/yii2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | yiisoft/yii2 | all versions | 2.0.38composer require yiisoft/yii2:^2.0.38 |
Affected Products
yiiyiiframeworkResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for yiisoft/yii2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update yiisoft/yii2 to 2.0.38 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-699q-wcff-g9mj is resolved across your whole dependency graph.
Workarounds
Do not deserialise data from untrusted sources: where the format allows it, restrict deserialisation to an explicit allowlist of expected types, and prefer a data-only format (JSON, Protobuf) over one that can reconstruct arbitrary objects until you can upgrade.
How to detect GHSA-699q-wcff-g9mj
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id ghsa-699q-wcff-g9mj -u https://target- Template
- Yii 2 < 2.0.38 - Remote Code Execution
- Severity
- critical
- Impact
- Successful exploitation of this vulnerability could allow an attacker to execute arbitrary code on the affected system.
- Remediation
- Upgrade to version 2.0.38 or later. A possible workaround without upgrading is available in the linked advisory.
Template by ProjectDiscovery nuclei-templates (pikpikcu), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is GHSA-699q-wcff-g9mj in your dependencies?
Find it across Packagist, including transitive dependencies.