CraftCMS stored XSS in Quick Post widget error message
Published 26 May 2023 · Updated 10 Sept 2026
Affected packages
- Affected
- >=4.0.0-RC1 <4.4.6
- Fixed in
- 4.4.6
composer require craftcms/cms:^4.4.6- Affected
- >=3.0.0 <3.8.6
- Fixed in
- 3.8.6
composer require craftcms/cms:^3.8.6Details
Summary
The platform does not filter input and encode output in Quick Post validation error message, which can deliver an XSS payload.
Details
Old CVE fixed the XSS in label HTML but didn’t fix it when clicking save.
PoC
1. Login at admin 2. Go to setting 3. Create a Section 4. On Entry page, click Edit label 5. Inject the XSS payload into the label and save 6. On the admin dashboard choose new widget -> Quick Post 7. In Quick Post, click save with blank slug; The XSS will be executed
"errors":{"title":["<script>alert('nono')</script> cannot be blank."],"slug":["Slug cannot be blank."]
Fixed in https://github.com/craftcms/cms/commit/9d0cd0bda7c8a830a3373f8c0f06943e519ac888
Is GHSA-3wxg-w96j-8hq9 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 craftcms/cms, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.