Executive brief
FastapiAdmin, an administrative dashboard framework, contains a security flaw in its system notification feature. An attacker with access to create notices can embed malicious scripts into the notice content. When other users or administrators view these notices, the script executes in their browser, potentially allowing the attacker to steal login sessions or perform unauthorized actions.
Technical details
A stored Cross-Site Scripting (XSS) vulnerability exists in the `/system/notice/create` (API endpoint `/api/v1/system/notice/create`) of FastapiAdmin versions up to and including 2.2.0. The root cause is a failure to sanitize the `notice_content` parameter before storing it in the database and subsequently rendering it in the frontend. The application uses `wangEditor` to display the content, which does not provide built-in XSS protection. An authenticated attacker can inject a crafted payload into the notice content; when a victim views the notice detail in the administrative interface, the payload executes in the context of their session. This can lead to session hijacking or unauthorized administrative actions. Mitigation requires implementing HTML sanitization (e.g., via DOMPurify) or switching to a secure markdown editor.
Affected products
- FastapiAdmin FastapiAdmin <= 2.2.0
Timeline
- 2026-06-09: disclosed: Initial disclosure and NVD publication