CraftCMS stored XSS in Quick Post widget error message
Impact
The platform does not filter input and encode output in Quick Post validation error message, which can deliver an XSS payload.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 4.0.0-RC1 before 4.4.6Ecosystem versions | 4.4.6 |
| From 3.0.0 before 3.8.6Ecosystem versions | 3.8.6 |
Version evidence: OSV · GHSA-3wxg-w96j-8hq9
View original version evidence (475 explicit versions)
Original source description
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
-
Login at admin
-
Go to setting
-
Create a Section
-
On Entry page, click Edit label
-
Inject the XSS payload into the label and save
-
On the admin dashboard choose new widget -> Quick Post
-
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
References
- Security advisory github.com/craftcms/cms/security/advisories/GHSA-3wxg-w96j-8hq9
- Security advisory nvd.nist.gov/vuln/detail/CVE-2023-33194
- Patch github.com/craftcms/cms/commit/9d0cd0bda7c8a830a3373f8c0f06943e519ac888
- Source reference github.com/craftcms/cms
- Release notes github.com/craftcms/cms/releases/tag/4.4.6