Skip to content

← Public intelligence

Packagist package

yiisoft/yii2

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

12 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.4PackagistPublished

    Yii 2: Local file inclusion via view parameter name collision

    CVE-2026-39850 · GHSA-5vpg-rj7q-qpw2

    Affected
    • Packagist yiisoft/yii2 < 2.0.55
    Fixed in
    2.0.55· Vendor fix available
    Issue
    The core view rendering method View::renderPhpFile() calls extract($params, EXTROVERWRITE) before the require statement that includes the view file. A caller-controlled parameter named file in the $params array overwrites the internal local variable that specifies which file is included — enabling a Local File Inclusion primitive. Impact - Local File Inclusion (arbitrary file read via non-PHP files) - Potential RCE if attacker can write PHP files via a separate primitive - Information disclosure Patches 2.0.55 Workarounds No.

    Recommended action: Upgrade to 2.0.55 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Critical, CVSS 9.0Exploited · CISA KEVPackagistPublished

    yiisoft/yii2 Mishandles the Attaching of Behavior Defined by a __class Array Key

    CVE-2024-58136 · GHSA-ggwg-cmwp-46r5

    Affected
    • Packagist yiisoft/yii2 < 2.0.52
    Fixed in
    2.0.52· Vendor fix available
    Issue
    Yii 2 before 2.0.52 mishandles the attaching of behavior that is defined by an class array key, a CVE-2024-4990 regression, as exploited in the wild in February through April 2025.

    Recommended action: Upgrade to 2.0.52 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)cisa.gov (2)Source checked Evidence →
  3. High, CVSS 8.1PackagistPublished

    Unsafe Reflection in base Component class in yiisoft/yii2

    CVE-2024-4990 · GHSA-cjcc-p67m-7qxm

    Affected
    • Packagist yiisoft/yii2 < 2.0.49.4
    Fixed in
    2.0.49.4· Vendor fix available
    Issue
    Yii2 supports attaching Behaviors to Components by setting properties having the format 'as <behaviour-name'. Internally this is done using the set() magic method. If the value passed to this method is not an instance of the Behavior class, a new object is instantiated using Yii::createObject($value). However, there is no validation check that verifies that $value is a valid Behavior class name or configuration. An attacker that can control the content of the $value variable can then instantiate arbitrary classes, passing parameters to their constructors and then invoking setter methods. Impact With some effort malicious code can be injected executed which might be anything ranging from deleting files to dropping database tables Patches Not yet patched. Workarounds No Work around available References Reported Here in case the link is dead, here is the full description Description Yii2 supports attaching Behaviors to Components by setting properties having the format 'as…

    Recommended action: Upgrade to 2.0.49.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Medium, CVSS 4.2PackagistPublished

    Reflected Cross-site Scripting in yiisoft/yii2 Debug mode

    CVE-2024-32877 · GHSA-qg5r-95m4-mjgj

    Affected
    • Packagist yiisoft/yii2 >= 2.0.43, < 2.0.49.4
    Fixed in
    2.0.49.4· Vendor fix available
    Issue
    During the internal penetration testing of our product based on Yii2, we discovered an XSS vulnerability within the framework itself. This issue is relevant for the latest version of Yii2 (2.0.49.3). Conditions for vulnerability reproduction The framework is in debug mode (YIIDEBUG set to true). The php.ini setting zend.exceptionignoreargs is set to Off (default value). An attacker induces an exception in the application, leading to a stack trace page being displayed. Vulnerability description The issue lies in the mechanism for displaying function argument values in the stack trace. The vulnerability manifests when an argument's value exceeds 32 characters. For convenience, argument values exceeding this limit are truncated and displayed with an added "...". The full argument value becomes visible when hovering over it with the mouse, as it is displayed in the title attribute of a span tag. However, the use of a double quote (") allows an attacker to break out of the title…

    Recommended action: Upgrade to 2.0.49.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. Critical, CVSS 9.8PackagistPublished

    Yii2 allows attackers to execute any local .php file via a relative path in the view parameter

    CVE-2015-5467 · GHSA-7cfq-72w2-24q4

    Affected
    • Packagist yiisoft/yii2 >= 2.0.0, < 2.0.5
    Fixed in
    2.0.5· Vendor fix available
    Issue
    web\ViewAction in Yii (aka Yii2) 2.x before 2.0.5 allows attackers to execute any local .php file via a relative path in the view parameeter.

    Recommended action: Upgrade to 2.0.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. UnratedPackagistPublished

    Yii Framework Cross-site Scripting Vulnerability

    CVE-2015-3397 · GHSA-w2xx-jp9f-gp8g

    Affected
    • Packagist yiisoft/yii2 < 2.0.4
    Fixed in
    2.0.4· Vendor fix available
    Issue
    Cross-site scripting (XSS) vulnerability in Yii Framework before 2.0.4 allows remote attackers to inject arbitrary web script or HTML via vectors related to JSON, arrays, and Internet Explorer 6 or 7.

    Recommended action: Upgrade to 2.0.4 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  7. Medium, CVSS 6.1PackagistPublished

    Yii Framework Reflected XSS

    CVE-2017-7271 · GHSA-4xh9-5vh8-3p58

    Affected
    • Packagist yiisoft/yii2 < 2.0.11
    Fixed in
    2.0.11· Vendor fix available
    Issue
    Reflected Cross-site scripting (XSS) vulnerability in Yii Framework before 2.0.11, when development mode is used, allows remote attackers to inject arbitrary web script or HTML via crafted request data that is mishandled on the debug-mode exception screen.

    Recommended action: Upgrade to 2.0.11 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  8. Medium, CVSS 6.1PackagistPublished

    Yii Cross-site Scripting Framework vulnerability

    CVE-2017-11516 · GHSA-4c64-w8fg-xcq2

    Affected
    • Packagist yiisoft/yii2 >= 2.0.12, <= 2.0.12
    Fixed in
    2.0.13· Vendor fix available
    Issue
    An XSS vulnerability exists in framework/views/errorHandler/exception.php in Yii Framework 2.0.12 affecting the exception screen when debug mode is enabled, because $exception-errorInfo is mishandled.

    Recommended action: Upgrade to 2.0.13 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  9. High, CVSS 8.8PackagistPublished

    Yii Framework Cross-Site Request Forgery (CSRF)

    CVE-2018-6009 · GHSA-cwhm-272p-3wj9

    Affected
    • Packagist yiisoft/yii2 >= 2.0, < 2.0.14
    Fixed in
    2.0.14· Vendor fix available
    Issue
    In Yii Framework 2.x before 2.0.14, the switchIdentity function in web/User.php did not regenerate the CSRF token upon a change of identity.

    Recommended action: Upgrade to 2.0.14 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  10. Medium, CVSS 5.9PackagistPublished

    Yii Incorrectly Implements CORS

    CVE-2018-20745 · GHSA-cr6r-6xm9-ww22

    Affected
    • Packagist yiisoft/yii2 < 2.0.16
    Fixed in
    2.0.16· Vendor fix available
    Issue
    Yii 2.x through 2.0.15.1 actively converts a wildcard CORS policy into reflecting an arbitrary Origin header value, which is incompatible with the CORS security design, and could lead to CORS misconfiguration security problems.

    Recommended action: Upgrade to 2.0.16 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  11. High, CVSS 7.5PackagistPublished

    Yii Framework reflected Cross-site Scripting

    CVE-2018-6010 · GHSA-8gfq-c54m-3rf6

    Affected
    • Packagist yiisoft/yii2 >= 2.0.0, < 2.0.14
    Fixed in
    2.0.14· Vendor fix available
    Issue
    In Yii Framework 2.x before 2.0.14, remote attackers could obtain potentially sensitive information from exception messages, or exploit reflected XSS on the error handler page in non-debug mode. Related to base/ErrorHandler.php, log/Dispatcher.php, and views/errorHandler/exception.php.

    Recommended action: Upgrade to 2.0.14 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  12. High, CVSS 8.9PackagistPublished

    Unsafe deserialization in Yii 2

    CVE-2020-15148 · GHSA-699q-wcff-g9mj

    Affected
    • Packagist yiisoft/yii2 < 2.0.38
    Fixed in
    2.0.38· Vendor fix available
    Issue
    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: For more information If you have any questions or comments about this advisory, contact us through security form.

    Recommended action: Upgrade to 2.0.38 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →