yiisoft/yii2: is it safe?

Short answer: Version 2.0.55 or later has a fix for every vulnerability listed here. Older versions may be affected: check the table against the exact version you run. 1 actively exploited.

Composer yiisoft/yii2 has 13 known advisories in the phpwarden feed, 1 actively exploited. Feed 2026.11.23.2, updated 2026-11-23.

13advisories
2critical
1on CISA KEV
0no fix recorded
CVETitleSeverityCVSSAffectedFixed in
CVE-2024-58136 KEVyiisoft/yii2 Mishandles the Attaching of Behavior Defined by a `__class` Array Keycritical9.0<2.0.522.0.52
CVE-2024-4990Unsafe Reflection in base Component class in yiisoft/yii2high8.1<2.0.49.42.0.49.4
CVE-2020-15148Unsafe deserialization in Yii 2high8.9<2.0.382.0.38
CVE-2018-6010Yii Framework reflected Cross-site Scriptinghigh7.5>=2.0.0 and <2.0.14 or <2.0.142.0.14
CVE-2015-3397Yii Framework Cross-site Scripting Vulnerabilitymedium0.0<2.0.42.0.4
CVE-2018-7269Potential SQL injection in methods `yii\db\ActiveRecord::findOne()` and `::findAll()`unknown0.0<2.0.12.1 or >=2.0.13 and <2.0.13.2 or >=2.0.14 and <2.0.152.0.12.1, 2.0.13.2, 2.0.15
CVE-2017-7271Yii Framework Reflected XSSmedium6.1<2.0.112.0.11
CVE-2015-5467Yii2 allows attackers to execute any local .php file via a relative path in the view parametercritical9.8>=2.0.0 and <2.0.5 or <2.0.52.0.5
CVE-2017-11516Yii Cross-site Scripting Framework vulnerabilitymedium6.1>=2.0.12 and <2.0.132.0.13
CVE-2018-6009Yii Framework Cross-Site Request Forgery (CSRF)high8.8>=2.0 and <2.0.14 or <2.0.142.0.14
CVE-2018-20745Yii Incorrectly Implements CORSmedium5.9<2.0.162.0.16
CVE-2026-39850Yii 2: Local file inclusion via view parameter name collisionhigh7.4<2.0.552.0.55
CVE-2024-32877Reflected Cross-site Scripting in yiisoft/yii2 Debug modemedium4.2>=2.0.43 and <2.0.49.42.0.49.4

Quick answers

Is yiisoft/yii2 safe to use?

Version 2.0.55 or later has a fix for every vulnerability listed here. Older versions may be affected: check the table against the exact version you run.

Is yiisoft/yii2 being actively exploited?

Yes. 1 of its 13 known vulnerabilities is on CISA's Known Exploited Vulnerabilities list, meaning attackers are using it now. Update before anything else.

How do I check my own site?

Run `phpwarden deps composer.lock`. phpwarden compares the exact version you have installed with these advisories and lists only the ones that apply, exploited ones first.

Am I affected?

Find out in one command. phpwarden checks your composer.lock against this advisory and 21,000+ others, ranked by real-world exploitation (CISA KEV + EPSS). Free, offline, open data.

# PHP projects (recommended)
composer require --dev phpwarden/phpwarden
# then
vendor/bin/phpwarden deps composer.lock

# or, without Composer
pipx install phpwarden   &&   phpwarden deps composer.lock

Or keep it checked automatically: GitHub Action · pre-commit hook · GitLab CI · Laravel artisan command

Install docs   How findings are ranked
A version is vulnerable when it falls inside an affected range and below the fixed version. phpwarden applies these ranges to the exact versions in your lockfile or install, so you only see what applies to you.

Add this status to your README

phpwarden status badge

Maintainer of this package? The badge updates itself whenever the feed is rebuilt (twice a day). Add ?v=1.2.3 to the image address to show the status of one exact version.

[![phpwarden](https://phpwarden.io/badge/yiisoft/yii2.svg)](https://phpwarden.io/packages/yiisoft/yii2)