
CVE-2026-22849 - Saleor lacks proper HTML sanitization in rich text fields
| Field | Details |
|---|
| CVE ID | CVE-2026-22849 |
| Severity | HIGH |
| Advisory | View Advisory |
| Discovered by | Lukasz Rybak |
Saleor was allowing users to modify rich text fields with HTML without running any backend HTML cleaners thus allowing malicious actors to perform stored XSS attacks on dashboards and storefronts.
Malicious staff members could craft script injections to target other staff members, possibly stealing their access and/or refresh tokens.
This issue has been patched in versions: 3.22.27, 3.21.43, and 3.20.108.
IMPORTANT: if you believe you are impacted, or if you are unsure or want to verify, you should run the following command:
$ ./manage.py clean_editorjs_fields
This scans all rich text fields and will display any differences detected. You should look for suspicious differences (e.g., unexpected javascript code) and if you want to fix the differences, run ./manage.py clean_editorjs_fields --apply
We strongly recommend upgrading to the latest versions, in case of inability to upgrade straight away, a possible workaround is to use client-side cleaner like DOMPurify.
main patch: https://github.com/saleor/saleor/commit/b67a0b9d9f243e5d6c2f9c7643d42a54c24c90eeThis vulnerability was reported by Quyền Vũ, and Łukasz Rybak.
This CVE was responsibly disclosed following coordinated vulnerability disclosure practices. The information provided here is for educational and defensive purposes only.