Summary
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.
Affected product
- Product: FileBrowser Quantum (
gtsteffaniak/filebrowser) - Verified version: v1.3.0-stable
- Docker image: gtstef/filebrowser:latest
- Affected endpoint:
GET /public/api/resources/download?hash=HASH&inline=true - CWE: CWE-79, Cross-site Scripting (Stored)
Reproduction
- Login as any user with upload permission
- Upload SVG file:
<svg xmlns="http://www.w3.org/2000/svg"> <script>alert(document.domain)</script> </svg> - Create public share for the file
- Access the share link with
?inline=true - JavaScript executes in browser
Root cause
The 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'
Impact
- Stored XSS, Malicious SVG persists and executes for every visitor to the share link
- No authentication required to trigger, Public share links are accessible to anyone
- Session hijacking, If authenticated users click the link, their session can be stolen
- Phishing, Attacker can redirect or overlay fake login forms
Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.
GHSA-MMPX-JH39-WRV6 has a CVSS score of 5.4 (Medium). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20260501184955-6bfc3974192e); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Add CSP header on inline file downloads:
w.Header().Set("Content-Security-Policy", "script-src 'none'")
This matches the upstream filebrowser/filebrowser implementation.
Frequently Asked Questions
- What is GHSA-MMPX-JH39-WRV6? GHSA-MMPX-JH39-WRV6 is a medium-severity cross-site scripting (XSS) vulnerability in github.com/gtsteffaniak/filebrowser (go), affecting versions < 0.0.0-20260501184955-6bfc3974192e. It is fixed in 0.0.0-20260501184955-6bfc3974192e. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
- How severe is GHSA-MMPX-JH39-WRV6? GHSA-MMPX-JH39-WRV6 has a CVSS score of 5.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/gtsteffaniak/filebrowser are affected by GHSA-MMPX-JH39-WRV6? github.com/gtsteffaniak/filebrowser (go) versions < 0.0.0-20260501184955-6bfc3974192e is affected.
- Is there a fix for GHSA-MMPX-JH39-WRV6? Yes. GHSA-MMPX-JH39-WRV6 is fixed in 0.0.0-20260501184955-6bfc3974192e. Upgrade to this version or later.
- Is GHSA-MMPX-JH39-WRV6 exploitable, and should I be worried? Whether GHSA-MMPX-JH39-WRV6 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-MMPX-JH39-WRV6 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-MMPX-JH39-WRV6? Upgrade
github.com/gtsteffaniak/filebrowserto 0.0.0-20260501184955-6bfc3974192e or later.