【高危】cms:跨站脚本风险(GHSA-24x4-j6x9-rfw5)
安全情报快照 · 风险级别:高危 · CVE-2026-55790 · GHSA-24x4-j6x9-rfw5
先看结论
cms存在跨站脚本风险,>= 5.0.0-RC1, < 5.9.22 受影响,建议升级至 5.9.23。
影响范围
| 生态 | 组件 | 受影响版本 | 首个修复版本 |
|---|---|---|---|
| composer | craftcms/cms |
>= 5.0.0-RC1, < 5.9.22 | 5.9.23 |
| composer | craftcms/cms |
>= 4.0.0-RC1, < 4.17.15 | 4.17.16 |
处置建议
优先将 craftcms/cms 升级至 5.9.23 或更高版本;升级前请结合业务依赖完成兼容性验证。
上游技术详情(原文)
Summary
An attacker with only a GitHub account can plant a JavaScript payload in a craftcms/cms issue title. When a Craft admin uses the CraftSupport widget’s "Give feedback" screen and types a search term that returns the poisoned issue, the payload executes in the admin’s control panel session.
No control panel account or elevated privileges are required on the attacker’s side.
Preconditions
- Attacker has a GitHub account (no control panel access needed).
- Victim is an administrator, and you have the CraftSupport widget on the dashboard.
- Victim uses the "Give feedback" screen and types a search term that returns the poisoned issue.
Root cause
CraftSupportWidget.js lines 382-392:
$('<a>', {
href: this.getSearchResultUrl(results[i]),
target: '_blank',
html:
'<span class="status ' +
this.getSearchResultStatus(results[i]) +
'"></span>' +
this.getSearchResultText(results[i]),
})
FeedbackScreen.getSearchResultText (line 669-671) returns result.title verbatim from the GitHub API response. The jQuery html: option sets the element’s innerHTML, so a title containing <img src=x onerror=...> executes immediately on render.
The GitHub API returns issue titles as raw JSON strings with no HTML encoding. The widget makes this request directly from the browser, without a Craft proxy or any sanitization step.
HelpScreen (Stack Exchange) is not affected because the Stack Exchange API HTML-encodes titles before returning them.
Steps to reproduce
Plant (attacker, GitHub account only):
- Open
https://github.com/craftcms/cms/issues/new. - Set the title to a string combining a plausible search term and the payload, e.g.:
<img src=x onerror=alert(document.domain)> cannot upload files
- Submit the issue.
Trigger (victim, Craft admin):
- Open the Craft control panel dashboard.
- Open the CraftSupport widget, click "Give feedback".
- Type
cannot upload filesin the search box. alert(document.domain)fires in the admin's session.
Impact
XSS in the admin control panel session. The payload has access to Craft.csrfTokenName and Craft.csrfTokenValue and can send same-origin action requests as the admin without any further interaction.
Mitigating factors
- Victim must actively use the "Give feedback" search screen.
- Attacker must predict or social-engineer a search term the admin will type, or use a broad term likely to match.
- Widget is only available to admins.
Resources
https://github.com/craftcms/cms/commit/6bbb66038a268552180ca5c8eed9f46ea25a4417
来源与许可
- GitHub Advisory GHSA-24x4-j6x9-rfw5
- https://github.com/craftcms/cms/security/advisories/GHSA-24x4-j6x9-rfw5
- https://nvd.nist.gov/vuln/detail/CVE-2026-55790
- https://github.com/craftcms/cms/commit/6bbb66038a268552180ca5c8eed9f46ea25a4417
本页自动同步 GitHub Advisory Database 的公开数据,并保留上游原文供核验;不宣称原创分析。数据许可:CC-BY-4.0。
评论
登录 后参与讨论。
还没有评论,来说两句。