Yii2 Gii Cross-site Scripting vulnerability
Published 10 Dec 2022 · Updated 23 Apr 2025
Is your project on an affected yiisoft/yii2-gii?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <=2.2.4
- Fixed in
- No fix released
Details
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.
Is GHSA-x87m-36g7-6mpw in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected yiisoft/yii2-gii, and gives you the command that fixes it.
More advisories for yiisoft/yii2-gii
- HighCVE-2020-36655Command injection in yiisoft/yii2-gii · 21 Jan 2023
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.