CVE-2025-2690 yiisoft Yii2 MockClass.php generate deserialization

Medium 5.3 Published Updated

Remote attackers can exploit unsafe deserialization in Yii2's MockClass to execute arbitrary code, requiring immediate framework upgrades.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-2690?

CVE-2025-2690 is a medium-severity unsafe deserialization vulnerability in yiisoft Yii2, published on 24 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A vulnerability, which was classified as critical, was found in yiisoft Yii2 up to 2.0.39. This affects the function Generate of the file phpunit\src\Framework\MockObject\MockClass.php. The manipulation leads to deserialization. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used.

Weakness: CWE-502, CWE-20

Which versions are affected by CVE-2025-2690?

It affects 1 product.

Products include Yiiframework Yii.

How do I fix CVE-2025-2690?

No fix has been published for CVE-2025-2690 yet. Limit exposure of the affected software until one is available.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2025-2690 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-2690 exists.

Sources

Also known as GHSA-97q7-cqc5-x5gj.

Is CVE-2025-2690 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free