FileBrowser Quantum serves inline SVG files without a Content-Security-Policy header, allowing embedded JavaScript in SVG files to execute when accessed via public share links.
Verified on v1.3.0-stable.
gtsteffaniak/filebrowser)GET /public/api/resources/download?hash=HASH&inline=true<svg xmlns="http://www.w3.org/2000/svg">
<script>alert(document.domain)</script>
</svg>
?inline=trueThe inline download endpoint returns SVG files with:
Content-Type: image/svg+xml
Content-Disposition: inline; filename="xss.svg"
X-Content-Type-Options: nosniff
But no CSP header to block script execution. The upstream project (filebrowser/filebrowser) mitigates this with:
Content-Security-Policy: script-src 'none'
Add CSP header on inline file downloads:
w.Header().Set("Content-Security-Policy", "script-src 'none'")
This matches the upstream filebrowser/filebrowser implementation.
{
"cwe_ids": [
"CWE-79"
],
"github_reviewed_at": "2026-05-07T03:29:43Z",
"github_reviewed": true,
"severity": "MODERATE",
"nvd_published_at": null
}