Every CVE Search/ Get API key

CVE-2022-34297

Yii2 Gii Cross-site Scripting vulnerability

5.4 Medium

Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.64%Down 0.2 points since Dec 10, 2022
90%50%10%1%

What each source reports

NVD Score used 5.4

Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.

Record
CVE-2022-34297
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
CVE List 5.4

Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.

Record
CVE-2022-34297
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2022-7771 5.4

Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.

Record
EUVD-2022-7771
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-x87m-36g7-6mpw 5.4

Yii2 Gii Cross-site Scripting vulnerability

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.

Record
GHSA-x87m-36g7-6mpw
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 5.4

Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.

Record
CVE-2022-34297
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-x87m-36g7-6mpw 5.4

Yii2 Gii Cross-site Scripting vulnerability

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.

Record
GHSA-x87m-36g7-6mpw
CVSS 3.1
5.4 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
yiisoft/yii2-gii
Packagist
through 2.2.4 None known
yiisoft/yii2-gii
Packagist
through 2.2.4, plus listed versions
2.0.02.0.0-alpha2.0.0-beta2.0.0-rc2.0.1
Show 16 moreShow less
2.0.22.0.32.0.42.0.52.0.62.0.72.0.82.1.02.1.12.1.22.1.32.1.42.2.02.2.12.2.22.2.3
None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-34297 is a medium vulnerability (CVSS 5.4) in Yiiframework Gii, published December 9, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.64%, the 50th percentile. No source names a fixed version.

References

MoveEnter Open