Reflected Cross-site Scripting in yiisoft/yii2 Debug mode
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
Yii 2 is a PHP application framework. During internal penetration testing of a product based on Yii2, users discovered a Cross-site Scripting (XSS) vulnerability within the framework itself. This issue is relevant for the latest version of Yii2 (2.0.49.3). This 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. 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. This issue has been addressed in version 2.0.50. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Yiiframework | yii2 | = 2.0.49.3 | — | No fix listed | CNA |
| — | yiisoft/yii2 (Packagist) | 2.0.43 to before 2.0.49.4 | 2.0.49.4 | Patch available | GHSA-qg5r-95m4-mjgj |
- yii2 VendorYiiframework Affected = 2.0.49.3 Fixed in — No fix listed CNA
- yiisoft/yii2 (Packagist) Vendor— Affected 2.0.43 to before 2.0.49.4 Fixed in 2.0.49.4 Patch available GHSA-qg5r-95m4-mjgj
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:yiiframework:yii:2.0.49.3:*:*:*:*:*:*:* | 2.0.49.3 | Vulnerable | Yiiframework |
- cpe:2.3:a:yiiframework:yii:2.0.49.3:*:*:*:*:*:*:* Versions 2.0.49.3 Vulnerable ·Yiiframework
Remediation
- Fix · GHSA-qg5r-95m4-mjgj yiisoft/yii2 (Packagist) Fixed in 2.0.49.4 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-32877
- 2026-10-03 Alias added: GHSA-qg5r-95m4-mjgj
References
Advisory 2
More Yiiframework Yii vulnerabilities
- TI-2024-38344 Yii 2 before 2.0.52 mishandles the attaching of behavior that is defined by an __class… KEVCVSS 3.1CRITICAL 9.8
- TI-2020-11920 Unsafe deserialization in Yii 2 CVSS 3.1CRITICAL 10.0
- TI-2024-04634 Unsafe Reflection in base Component class in yiisoft/yii2 CVSS 3.1CRITICAL 9.1
- TI-2025-02355 yiisoft Yii2 MockClass.php generate deserialization CVSS 4.0MEDIUM 5.3
- TI-2025-02354 yiisoft Yii2 SortableIterator.php getIterator deserialization CVSS 4.0MEDIUM 5.3
- TI-2023-11755 SQL injection vulnerability found in Yii Framework Yii 2 Framework before v.2.0.47 allows… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-32877 · CVE Program
- CVE-2024-32877 · NVD
- FIRST EPSS
- GHSA-qg5r-95m4-mjgj · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences