GHSA-mmpx-jh39-wrv6: Github.com/gtsteffaniak/filebrowser Cross-Site Scripting Vulnerability

MODERATE
CVSS 5.4
CWE-79
Published
Advisory Summary

GHSA-mmpx-jh39-wrv6 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/gtsteffaniak/filebrowser libraries in the Go ecosystem. The issue involves filebrowser vulnerable to stored xss via svg file in public share (missing csp header). Remediation is available by upgrading affected packages to version 0.0.0-20260501184955-6bfc3974192e.

GHSA-mmpx-jh39-wrv6 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mmpx-jh39-wrv6
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Github.com/gtsteffaniak/filebrowser
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix GHSA-mmpx-jh39-wrv6

To remediate this vulnerability, upgrade all affected Github.com/gtsteffaniak/filebrowser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gtsteffaniak/filebrowser fixed: 0.0.0-20260501184955-6bfc3974192e
Upgrade github.com/gtsteffaniak/filebrowser to 0.0.0-20260501184955-6bfc3974192e
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gtsteffaniak/filebrowser

How to Check if You Are Affected

To determine whether your application is affected by GHSA-mmpx-jh39-wrv6, inspect your project dependencies for Github.com/gtsteffaniak/filebrowser:

inspect dependencies for github.com/gtsteffaniak/filebrowser

Analyze the terminal output to locate any version of Github.com/gtsteffaniak/filebrowser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20260501184955-6bfc3974192e), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Github.com/gtsteffaniak/filebrowser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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) ## 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 ## Reproduction 1. Login as any user with upload permission 2. Upload SVG file: ```xml <svg xmlns="http://www.w3.org/2000/svg"> <script>alert(document.domain)</script> </svg> ``` 3. Create public share for the file 4. Access the share link with `?inline=true` 5. 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' ``` ## Suggested fix Add CSP header on inline file downloads: ```go w.Header().Set("Content-Security-Policy", "script-src 'none'") ``` This matches the upstream filebrowser/filebrowser implementation.

GHSA-mmpx-jh39-wrv6 Affected Github.com/gtsteffaniak/filebrowser Versions

1 component(s)
Fixed Versions:
0.0.0-20260501184955-6bfc3974192e
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gtsteffaniak/filebrowser
Go
< 0.0.0-20260501184955-6bfc3974192e
0.0.0-20260501184955-6bfc3974192e

References

Frequently Asked Questions

What is GHSA-mmpx-jh39-wrv6?
GHSA-mmpx-jh39-wrv6 is a security vulnerability in Github.com/gtsteffaniak/filebrowser involving FileBrowser Vulnerable to Stored XSS via SVG File in Public Share (Missing CSP Header) under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Github.com/gtsteffaniak/filebrowser versions are affected?
Affected versions include releases prior to 0.0.0-20260501184955-6bfc3974192e across affected packages: github.com/gtsteffaniak/filebrowser.
What version fixes GHSA-mmpx-jh39-wrv6?
Upgrading to 0.0.0-20260501184955-6bfc3974192e (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gtsteffaniak/filebrowser affected?
Yes, github.com/gtsteffaniak/filebrowser is affected in releases prior to 0.0.0-20260501184955-6bfc3974192e. Upgrade your dependency to 0.0.0-20260501184955-6bfc3974192e or later.
What is the CVSS score of GHSA-mmpx-jh39-wrv6?
GHSA-mmpx-jh39-wrv6 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with GHSA-mmpx-jh39-wrv6?
GHSA-mmpx-jh39-wrv6 is classified under CWE-79: 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.).
How can I check Go dependencies for GHSA-mmpx-jh39-wrv6?
Run the dependency tree command: 'inspect dependencies for github.com/gtsteffaniak/filebrowser'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mmpx-jh39-wrv6",
  "modified" : "2026-05-07T03:29:43Z",
  "published" : "2026-05-07T03:29:43Z",
  "aliases" : [ ],
  "summary" : "FileBrowser Vulnerable to Stored XSS via SVG File in Public Share (Missing CSP Header)",
  "details" : "## Summary\n\nFileBrowser 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.\n\nVerified on v1.3.0-stable.\n\n## Affected product\n\n- **Product:** FileBrowser Quantum (`gtsteffaniak/filebrowser`)\n- **Verified version:** v1.3.0-stable\n- **Docker image:** gtstef/filebrowser:latest\n- **Affected endpoint:** `GET /public/api/resources/download?hash=HASH&inline=true`\n- **CWE:** CWE-79 — Cross-site Scripting (Stored)\n\n## Impact\n\n- **Stored XSS** — Malicious SVG persists and executes for every visitor to the share link\n- **No authentication required to trigger** — Public share links are accessible to anyone\n- **Session hijacking** — If authenticated users click the link, their session can be stolen\n- **Phishing** — Attacker can redirect or overlay fake login forms\n\n## Reproduction\n\n1. Login as any user with upload permission\n2. Upload SVG file:\n   ```xml\n   <svg xmlns=\"http://www.w3.org/2000/svg\">\n     <script>alert(document.domain)</script>\n   </svg>\n   ```\n3. Create public share for the file\n4. Access the share link with `?inline=true`\n5. JavaScript executes in browser\n\n## Root cause\n\nThe inline download endpoint returns SVG files with:\n```\nContent-Type: image/svg+xml\nContent-Disposition: inline; filename=\"xss.svg\"\nX-Content-Type-Options: nosniff\n```\n\nBut no CSP header to block script execution. The upstream project (filebrowser/filebrowser) mitigates this with:\n```\nContent-Security-Policy: script-src 'none'\n```\n\n## Suggested fix\n\nAdd CSP header on inline file downloads:\n\n```go\nw.Header().Set(\"Content-Security-Policy\", \"script-src 'none'\")\n```\n\nThis matches the upstream filebrowser/filebrowser implementation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gtsteffaniak/filebrowser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260501184955-6bfc3974192e"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/security/advisories/GHSA-mmpx-jh39-wrv6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/commit/6bfc3974192e954f71cc5d1cd04baaaec3b76383"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gtsteffaniak/filebrowser"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T03:29:43Z",
    "nvd_published_at" : null
  }
}