[Stored XSS, CVE] Seafile SVG
While exploring secure image handling in web applications, I came across a stored cross-site scripting (XSS) vulnerability in Seafile, a popular open-source file storage and collaboration platform.
This vulnerability allows an attacker to upload a malicious SVG file that executes JavaScript when viewed directly or embedded, potentially compromising user sessions and data.
Summary
Seafile does not adequately sanitize SVG files uploaded by users, allowing arbitrary JavaScript execution when the SVG is accessed via its raw URL. This issue is made more dangerous because the raw vulnerable URL is exposed in the page source and can be shared with other users, leading to widespread XSS.
Proof of Concept (PoC)
1. Log in to a Seafile instance.
2. Upload an SVG file containing embedded JavaScript (e.g., <svg><script>alert(document.domain)</script></svg>).
3. Right-click the uploaded image and select “Open in new tab.”
4. The raw SVG URL opens and the JavaScript payload executes.
5. Additionally, inspecting the page source of the file preview reveals the same raw vulnerable URL. If this file is shared, anyone with access can trigger the XSS.
Impact
· Stored XSS affecting all users who view or open the malicious file.
· Possible session hijacking, account takeover, or actions performed on behalf of the user.
· Risk increases in shared environments (teams, organizations).
Bounty & Recognition
This vulnerability was acknowledged and rewarded with a $200 bounty through the responsible disclosure program.
CVE: CVE-2025-65516


Comments
Post a Comment