CVE-2026-30934: FileBrowser Quantum: Stored XSS in public share page via unsanitized share metadata (text/template misuse)
Summary Stored XSS is possible via share metadata fields (e.g., title, description) that are rendered into HTML for /public/share/ without context-aware escaping. The server uses text/template instead of html/template, allowing injected scripts to execute when victims visit the share URL.
Published Mar 9, 2026 · Updated Mar 24, 2026
Affected packages
github.com/gtsteffaniak/filebrowser
- Ecosystem
- Go
- Affected
- < 0.0.0-20260307130210-09713b32a5f6
- Fixed in
- 0.0.0-20260307130210-09713b32a5f6
- Check
go list -m github.com/gtsteffaniak/filebrowser
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
Stored XSS is possible via share metadata fields (e.g., title, description) that are rendered into HTML for /public/share/<hash> without context-aware escaping. The server uses text/template instead of html/template, allowing injected scripts to execute when victims visit the share URL.
Details
The server renders public/index.html using text/template and injects user-controlled share fields (title/description/etc.) into HTML contexts. text/template does not perform HTML contextual escaping like html/template. Because share metadata is persistent, the payload becomes stored and executes whenever a victim opens the affected share page.
Relevant code paths:
backend/http/static.go(template rendering and share metadata assignment)backend/http/httpRouter.go(template initialization)frontend/public/index.html(insertion points for title/description and related fields)
PoC
- Login as a user with share creation permission.
- Create a share (
POST /api/share) with malicious metadata: title = </title><script>alert("xss")</script><title>- Open the resulting
/public/share/<hash>URL in a browser. - Expected: Payload is safely escaped and displayed as text.
- Actual: JavaScript executes in victim's browser (stored XSS).
Tested on Docker image: gtstef/filebrowser:stable (version v1.2.1-stable).
Impact
- Arbitrary script execution in application origin.
- Potential account/session compromise, CSRF-like action execution, data exfiltration from authenticated contexts.
- Affects anyone (including unauthenticated visitors) opening the malicious share URL.
- The XSS is stored and persistent — no social engineering beyond sharing the link is required.
Credited to lulaide.
References
- https://github.com/gtsteffaniak/filebrowser/security/advisories/GHSA-r633-fcgp-m532
- https://github.com/gtsteffaniak/filebrowser/releases/tag/v1.2.2-stable
- https://github.com/gtsteffaniak/filebrowser/releases/tag/v1.3.1-beta
- https://nvd.nist.gov/vuln/detail/CVE-2026-30934
- https://pkg.go.dev/vuln/GO-2026-4660
- https://github.com/advisories/GHSA-r633-fcgp-m532
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesGHSA-r4v7-6wcg-ghj5
FileBrowser: Missing Rate Limiting on Authentication Endpoint Enables Brute Force Attacks
medium6.5Jun 25, 2026CVE-2026-46410
FileBrowser Quantum: unauthenticated user share share info
high8.7May 19, 2026CVE-2026-44542
FileBrowser Public Share DELETE API Path Traversal Allows Unauthenticated Arbitrary File Deletion
critical9.1May 7, 2026GHSA-mmpx-jh39-wrv6
FileBrowser Vulnerable to Stored XSS via SVG File in Public Share (Missing CSP Header)
medium5.4May 7, 2026
