Skip to content

FileBrowser Quantum: Stored XSS in public share page via unsanitized share metadata (text/template misuse)

High severity GitHub Reviewed Published Mar 7, 2026 in gtsteffaniak/filebrowser • Updated Mar 10, 2026

Package

gomod github.com/gtsteffaniak/filebrowser (Go)

Affected versions

< 0.0.0-20260307130210-09713b32a5f6

Patched versions

0.0.0-20260307130210-09713b32a5f6

Description

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

  1. Login as a user with share creation permission.
  2. Create a share (POST /api/share) with malicious metadata:
    • title = </title><script>alert("xss")</script><title>
  3. Open the resulting /public/share/<hash> URL in a browser.
  4. Expected: Payload is safely escaped and displayed as text.
  5. 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.

References

@gtsteffaniak gtsteffaniak published to gtsteffaniak/filebrowser Mar 7, 2026
Published to the GitHub Advisory Database Mar 9, 2026
Reviewed Mar 9, 2026
Published by the National Vulnerability Database Mar 10, 2026
Last updated Mar 10, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(11th percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

CVE ID

CVE-2026-30934

GHSA ID

GHSA-r633-fcgp-m532

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.