5.4medium
Yii2 Gii Cross-site Scripting vulnerability
- Severity
- 5.4medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.66% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-x87m-36g7-6mpw
Description
Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| yiisoft/yii2-gii (Packagist) | up to 2.2.4 | GitHub Advisory Database |
| yiiframework gii | up to 2.2.4 | NVD |
All scores
| CISA-ADP | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Yii Yii2 Gii through 2.2.4 allows stored XSS by injecting a payload into any field.
GitHub Advisory Database
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.
NVD (es)
Yii Yii2 Gii hasta 2.2.4 permite almacenar XSS inyectando un payload en cualquier campo.
References
| https://gist.github.com/be4r/b5c48d97ef6726d3ee37f995ee5aac81 | exploit, third-party-advisory, web | |
| https://github.com/yiisoft/yii2-gii | product, web | |
| https://www.yiiframework.com/doc/guide/2.0/en/start-gii | product, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-34297 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-34297 changed 2025-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x87m-36g7-6mpw changed 2025-04-23 | CC-BY-4.0 |
| NVD | CVE-2022-34297 changed 2026-06-17 | Public domain |