Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2024-32877

MEDIUM 4.2EPSS 41%

Reflected Cross-site Scripting in yiisoft/yii2 Debug mode

Also known as GHSA-qg5r-95m4-mjgj

Mitigation

  • Upgrade yiisoft/yii2 to 2.0.49.4 or later.

Who should check

  • Projects that depend on Packagist package yiisoft/yii2 (>= 2.0.43, < 2.0.49.4)
  • Anyone running yiisoft yii2 = 2.0.49.3

Vulnerability facts

Affected
yiisoft/yii2 >= 2.0.43, < 2.0.49.4
Fixed in
2.0.49.4
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
4.2 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: None
  • User interaction: Required
  • Scope: Unchanged
  • Confidentiality impact: Low
  • Integrity impact: Low
  • Availability impact: None
EPSS
0.57% chance of exploitation in 30 days (percentile 41, 2026-11-26)
CWE
CWE-79
Published
Modified

Description

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.

Affected and fixed versions

Package / productAffectedFixedSource
Packagist yiisoft/yii2>= 2.0.43, < 2.0.49.42.0.49.4osv
yiisoft yii2= 2.0.49.3—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2024-32877. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-32877.md
Affected: yiisoft/yii2 >= 2.0.43, < 2.0.49.4
Fixed in: 2.0.49.4

Steps:
1. Search this machine and project for yiisoft/yii2 (Packagist), yiisoft yii2: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2024-32877 being exploited?

There is no confirmed exploitation: CVE-2024-32877 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.57% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2024-32877?

Medium: CVSS 4.2 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2024-32877?

yiisoft/yii2 >= 2.0.43, < 2.0.49.4.

Is there a fix for CVE-2024-32877?

Yes. Fixed in 2.0.49.4. Upgrade yiisoft/yii2 to 2.0.49.4 or later.

How do I check if I'm affected by CVE-2024-32877?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors