lukasz-rybak/CVE-2026-22849
GitHub: lukasz-rybak/CVE-2026-22849
该仓库披露了 Saleor 电商平台中因富文本字段缺乏 HTML 清理而导致的高危存储型 XSS 漏洞细节及修复方案。
Stars: 0 | Forks: 0
# CVE-2026-22849:Saleor 在富文本字段中缺乏适当的 HTML 清理
## 概述
| 字段 | 详情 |
|---|---|
| **CVE ID** | [CVE-2026-22849](https://nvd.nist.gov/vuln/detail/CVE-2026-22849) |
| **严重程度** | HIGH |
| **公告** | [查看公告](https://github.com/saleor/saleor/security/advisories/GHSA-8jcj-r5g2-qrpv) |
| **发现者** | [Lukasz Rybak](https://github.com/lukasz-rybak) |
## 受影响产品
- **saleor/saleor**
## 详情
Saleor 允许用户使用 HTML 修改富文本字段,而未在后端运行任何 HTML 清理程序,从而允许恶意行为者在仪表板和店面中执行存储型 XSS 攻击。
### 影响
恶意的工作人员可以编写脚本注入来攻击其他工作人员,可能会窃取其访问令牌和/或刷新令牌。
### 缓解措施
此问题已在以下版本中修复:3.22.27、3.21.43 和 3.20.108。
重要:如果您认为自己受到影响,或者不确定并想要进行验证,您应该运行以下命令:
```
$ ./manage.py clean_editorjs_fields
```
此命令会扫描所有富文本字段,并显示检测到的任何差异。您应该查找可疑的差异(例如,意外的 javascript 代码),如果您想要修复这些差异,请运行 `./manage.py clean_editorjs_fields --apply`
### 变通方法
我们强烈建议升级到最新版本。如果无法立即升级,一种可能的变通方法是使用客户端清理工具,例如 [DOMPurify](https://github.com/cure53/DOMPurify)。
### 参考资料
- 引入该问题的提交:https://github.com/saleor/saleor/commit/9110eba68c3f73afa1f72b45bd9b1394c752d335
- 文档:https://docs.saleor.io/security/#editorjs--html-cleaning
- `main` 分支补丁:https://github.com/saleor/saleor/commit/b67a0b9d9f243e5d6c2f9c7643d42a54c24c90ee
- 3.22:https://github.com/saleor/saleor/commit/676d95dbc7d811610e68f2ea8f9b6652cbd58e9b
- 3.21:https://github.com/saleor/saleor/commit/1085c7813224a0a65f1dac7275cbc3244e23c386
- 3.20:https://github.com/saleor/saleor/commit/bb5f883aeb0f085899a9d4f35d429cf7eb07a11d
### 致谢
此漏洞由 [Quyền Vũ](https://github.com/vuquyen03) 和 [Łukasz Rybak](https://github.com/lukasz-rybak) 报告。
## 参考资料
- https://github.com/saleor/saleor/security/advisories/GHSA-8jcj-r5g2-qrpv
- https://github.com/saleor/saleor/commit/1085c7813224a0a65f1dac7275cbc3244e23c386
- https://github.com/saleor/saleor/commit/676d95dbc7d811610e68f2ea8f9b6652cbd58e9b
- https://github.com/saleor/saleor/commit/9110eba68c3f73afa1f72b45bd9b1394c752d335
- https://github.com/saleor/saleor/commit/b67a0b9d9f243e5d6c2f9c7643d42a54c24c90ee
- https://github.com/saleor/saleor/commit/bb5f883aeb0f085899a9d4f35d429cf7eb07a11d
- https://docs.saleor.io/security/#editorjs--html-cleaning
## 免责声明
此 CVE 是按照协同漏洞披露(Coordinated Vulnerability Disclosure)实践负责任地披露的。此处提供的信息仅供教育和防御目的使用。
标签:CVE-2026-22849, DOMPurify, EditorJS, HTML清理, Saleor, Web安全, 令牌窃取, 后端安全, 多模态安全, 存储型XSS, 安全漏洞, 富文本字段, 数据净化, 数据可视化, 注入攻击, 漏洞修复, 电商平台, 电子商务, 网络安全培训, 蓝队分析, 跨站脚本攻击, 逆向工具, 高危漏洞