Where
-Infinity
0

Vendor Risk Score

See how yiiframework compares to other vendors in security performance

View Risk Score →
Severity
6.5
EPSS
0.04%
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Impact

On failing connection extension writes commands sequence to logs. AUTH parameters are written in plain text exposing username and password. That might be an issue if attacker has access to logs.

1 / 2
Source: GitHub
First published (updated )
Severity
6.1
EPSS
0.03%
XSS
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Impact Affected versions of yiisoft/yii are vulnerable to Reflected XSS in specific scenarios where the fallback error renderer is used.

Patches Upgrade yiisoft/yii to version 1.1.31 or higher.

References - Git commit

If you have any questions or comments about this advisory, contact us through security form.

1 / 2
Source: GitHub
First published (updated )
Severity
9.8
Code Injection
AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

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.

1 / 2
Source: GitHub
First published (updated )
Severity
5.3
EPSS
0.03%
Input Validation
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

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.

First published (updated )
Severity
5.3
EPSS
0.04%
Input Validation
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

A vulnerability, which was classified as critical, has been found in yiisoft Yii2 up to 2.0.45. Affected by this issue is the function getIterator of the file symfony\finder\Iterator\SortableIterator.php. The manipulation leads to deserialization. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.

First published (updated )
Severity
9.1
EPSS
0.03%
CSRF
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

In yiisoft/yii2 version 2.0.48, the base Component class contains a vulnerability where the set() magic method does not validate that the value passed is a valid Behavior class name or configuration. This allows an attacker to instantiate arbitrary classes, passing parameters to their constructors and invoking setter methods. Depending on the installed dependencies, various types of attacks are possible, including the execution of arbitrary code, retrieval of sensitive information, and unauthorized access.

1 / 2
Source: NVD
First published (updated )
Severity
4.7
XSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

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 attribute's value context and inject their own attributes into the span tag, including malicious JavaScript code through event handlers such as onmousemove.

Demonstration example: http://31.184.254.143/about/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%22%20onmousemove=alert(1)%20style=%22width:%20100000px;%20height:%20100000px;%20position:%20absolute;%20top:%20-10000px;%20left:%200;%22

Impact of the vulnerability

This vulnerability allows an attacker to execute arbitrary JavaScript code in the security context of the victim's site via a specially crafted link. This could lead to the theft of cookies (including httpOnly cookies, which are accessible on the page), content substitution, or complete takeover of user accounts.

Technical analysis and mitigation suggestion

Upon analyzing the framework's source code, it was found that data handling for the title attribute is performed in the file framework/web/ErrorHandler.php. The identified problem is related to changes made in the commit https://github.com/yiisoft/yii2/commit/8cc9aeb2f0b2ffe02fb54a817064e9da75512706 , which led to the disabling of encoding for single and double quotes in the htmlEncode method (https://github.com/yiisoft/yii2/blob/8cc9aeb2f0b2ffe02fb54a817064e9da75512706/framework/web/ErrorHandler.php#L183) due to the addition of the ENTNOQUOTES flag. To address this issue while preserving the functionality intended by the commit, we suggest modifying the htmlEncode method as follows:

return htmlspecialchars($text, ENTQUOTES | ENTSUBSTITUTE | ENTHTML5, 'UTF-8');

This change will effectively prevent the XSS vulnerability while maintaining the targeted functionality of the previous changes.

Conclusion

Based on the above, we strongly recommend implementing the suggested changes to the project's main code as soon as possible to protect framework users from potential attacks. I am ready to provide further information or assistance, including creating a pull request if necessary.

1 / 2
Source: GitHub
First published (updated )
Severity
9.8
AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

Impact What kind of vulnerability is it? Who is impacted?

Original Report:

The Oauth1/2 "state" and OpenID Connect "nonce" is vulnerable for a "timing attack" since it's compared via regular string comparison (instead of Yii::$app->getSecurity()->compareString()).

Affected Code:

1. OAuth 1 "state"

https://github.com/yiisoft/yii2-authclient/blob/0d1c3880f4d79e20aa1d77c012650b54e69695ff/src/OAuth1.php#L158

3. OAuth 2 "state" https://github.com/yiisoft/yii2-authclient/blob/0d1c3880f4d79e20aa1d77c012650b54e69695ff/src/OAuth2.php#L121

4. OpenID Connect "nonce" https://github.com/yiisoft/yii2-authclient/blob/0d1c3880f4d79e20aa1d77c012650b54e69695ff/src/OpenIdConnect.php#L420

Patches Has the problem been patched? What versions should users upgrade to?

TBD: Replace strcmp with Yii::$app->getSecurity()->compareString()).

Workarounds Is there a way for users to fix or remediate the vulnerability without upgrading?

not as far as I see.

References Are there any links users can visit to find out more?

1 / 2
First published (updated )
Severity
8.8
CSRF, SSRF
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

Impact What kind of vulnerability is it? Who is impacted?

Original Report:

The Oauth2 PKCE implementation is vulnerable in 2 ways: 1. The authCodeVerifier should be removed after usage (similar to 'authState') 2. There is a risk for a "downgrade attack" if PKCE is being relied on for CSRF protection.

Patches Has the problem been patched? What versions should users upgrade to?

2.2.15

Workarounds Is there a way for users to fix or remediate the vulnerability without upgrading?

not known yet.

References Are there any links users can visit to find out more?

1 / 2
First published (updated )
Severity
9.8
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Impact Affected versions of yiisoft/yii are vulnerable to Remote Code Execution (RCE) if the application calls unserialize() on arbitrary user input.

Patches Upgrade yiisoft/yii to version 1.1.29 or higher.

For more information See the following links for more details: - Git commit - https://owasp.org/www-community/vulnerabilities/PHPObjectInjection

If you have any questions or comments about this advisory, contact us through security form.

1 / 2
First published (updated )
Severity
6.1
XSS
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

DISPUTED Yii 2 v2.0.45 was discovered to contain a cross-site scripting (XSS) vulnerability via the endpoint /books. NOTE: this is disputed by the vendor because the cve-2022-31454-8e8555c31fd3 page does not describe why /books has a relationship to Yii 2.

1 / 3
First published (updated )
Severity
9.8
SQL Injection, XSS
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

DISPUTED SQL injection vulnerability found in Yii Framework Yii 2 Framework before v.2.0.47 allows the a remote attacker to execute arbitrary code via the runAction function. NOTE: the software maintainer's position is that the vulnerability is in third-party code, not in the framework.

1 / 3
First published (updated )
Severity
8.8
Code Injection
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Yii Yii2 Gii before 2.2.2 allows remote attackers to execute arbitrary code via the Generator.php messageCategory field. The attacker can embed arbitrary PHP code into the model file.

First published (updated )
Severity
5.4
XSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Some fields like Message Category (requires I18N enabled) in Model Generator, CRUD Generator or Form Generator, Author Name in Extension Generator, etc. are being cached without sanitisation of their contents when the Preview button is pressed. This leads to possibility of injecting malicious javascript in specified pages by placing it in said fields and caching it by pressing Preview button. On each consequent visit of specified pages malicious javascript will be loaded from server and executed in client's browser.

1 / 2
Source: GitHub
First published (updated )
Severity
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

yiisoft/yii before version 1.1.27 are vulnerable to Remote Code Execution (RCE) if the application calls unserialize() on arbitrary user input. This has been patched in 1.1.27.

First published (updated )
Severity
5.3
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

yii2 is vulnerable to Use of Predictable Algorithm in Random Number Generator

First published (updated )
Severity
7.5
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

yii2 is vulnerable to Use of Predictable Algorithm in Random Number Generator

First published (updated )
Severity
10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

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:

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.

1 / 3
Source: GitHub
First published (updated )
Severity
5.9
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

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.

First published (updated )
Severity
9.8
Code Injection
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Potential remote code execution in LUA context of the redis server via methods yii\redis\ActiveRecord::findOne() and ::findAll()

1 / 3
First published (updated )
Severity
8.1
Code Injection
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Possibility of manipulated condition when unfiltered input is passed to yii\elasticsearch\ActiveRecord::findOne() and ::findAll()

1 / 2
First published (updated )
Severity
9.8
SQL Injection
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Potential SQL injection in methods yii\db\ActiveRecord::findOne() and ::findAll()

1 / 3
First published (updated )
Severity
7.5
XSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

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.

1 / 2
First published (updated )
Severity
8.8
CSRF
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

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.

1 / 2
First published (updated )
Severity
6.1
XSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

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.

First published (updated )
Severity
9.8
Path Traversal
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

class yii\web\ViewAction allowed to include arbitrary files that end with .php

1 / 2
First published (updated )
Severity
4.3
XSS
AV:N/AC:M/Au:N/C:N/I:P/A:N

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.

1 / 2
First published (updated )
Severity
7.5
Code Injection
AV:N/AC:L/Au:N/C:P/I:P/A:P

The CDetailView widget allows remote attackers to execute arbitrary PHP scripts via vectors related to the value property

1 / 2
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203