CVE-2025-65516
📋 TL;DR
A stored cross-site scripting (XSS) vulnerability in Seafile Community Edition allows attackers to upload malicious SVG files containing JavaScript. When victims open shared public links to these files, the script executes in their browsers, potentially compromising their accounts. This affects Seafile instances configured with the Golang file server.
💻 Affected Systems
- Seafile Community Edition
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers steal session cookies, perform actions as authenticated users, or redirect to phishing sites, leading to full account compromise and data theft.
Likely Case
Session hijacking, credential theft, or unauthorized actions within the victim's Seafile account.
If Mitigated
Limited impact if proper content security policies and input validation are in place, though XSS could still bypass some controls.
🎯 Exploit Status
Exploitation requires uploading a crafted SVG file and sharing it via a public link; attackers need some access to upload files.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 13.0.12
Vendor Advisory: https://manual.seafile.com/latest/changelog/server-changelog/
Restart Required: Yes
Instructions:
1. Backup your Seafile data and configuration. 2. Download Seafile Community Edition 13.0.12 or later from the official repository. 3. Stop the Seafile service. 4. Replace the existing installation with the new version. 5. Restart the Seafile service. 6. Verify the update by checking the version.
🔧 Temporary Workarounds
Disable Golang File Server
allSwitch to a different file server configuration if possible to avoid the vulnerable component.
Edit Seafile configuration to use an alternative file server (e.g., Nginx or Apache) instead of Golang.
Restrict File Uploads
allLimit upload permissions to trusted users only and disable public link sharing for SVG files.
Configure Seafile settings to restrict uploads and disable public links for SVG files via admin panel.
🧯 If You Can't Patch
- Implement a web application firewall (WAF) with XSS filtering rules to block malicious SVG payloads.
- Enforce strict content security policies (CSP) to prevent script execution from untrusted sources.
🔍 How to Verify
Check if Vulnerable:
Check if Seafile version is below 13.0.12 and if configured with Golang file server in the configuration files.
Check Version:
seafile-admin --version or check the version in the Seafile web interface under admin settings.
Verify Fix Applied:
Confirm the Seafile version is 13.0.12 or higher and test by attempting to upload a benign SVG file with script tags to see if it's sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual uploads of SVG files, especially with JavaScript content, or spikes in public link access logs.
Network Indicators:
- HTTP requests to SVG files with embedded script tags or unusual outbound connections from user browsers.
SIEM Query:
source="seafile.log" AND (file_extension="svg" AND (content="script" OR content="javascript"))