/

CVE-2026-54910

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in FileBrowser Quantum API

CVE-2026-54910

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-23

Impact:

Arbitrary File Read

Severity:

HIGH RISK

(7.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FileBrowser Quantum's subtitlesHandler endpoint allows user-controlled path and file name parameters to be used directly in filesystem operations without sanitization.

An authenticated user can traverse outside the configured storage root and read arbitrary text files accessible to the server process, becoming risky whenever sensitive configuration or key material is stored on disk.

Affected context

This vulnerability appears in deployments of FileBrowser Quantum where the /api/media/subtitles endpoint is exposed to authenticated users.

It is relevant whenever the application server runs with permissions to read files beyond the intended storage root, such as system configuration, SSH keys, or application secrets.

The issue manifests when user-supplied path and name query parameters are treated as trusted filesystem inputs without normalization or policy enforcement.

Exploit preconditions

  • Attack surface: HTTP GET requests to /api/media/subtitles via the subtitlesHandler endpoint.
  • Required access: Any authenticated account, regardless of role or file access permissions within the application.
  • Trigger point: Supplying crafted path and/or name query parameters that include directory traversal sequences (../) or absolute-like paths.
  • Why exploitation is possible:
  • The path parameter is passed directly to idx.GetRealPath() without going through SanitizeUserPath(), allowing parentDir to resolve outside the storage root.
  • The name parameter is joined with parentDir using filepath.Join(parentDir, name) without stripping directory components, enabling traversal relative to the attacker-controlled parentDir.
  • No anchor file or prior knowledge of existing paths is required; the attacker can directly target known system or application files.

Why this happens

The root cause is improper validation and normalization of user-supplied filesystem paths before they are used in file resolution logic.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') and CWE-23: Relative Path Traversal, where input meant to identify resources under a constrained directory is allowed to escape that boundary.

By calling path resolution functions on raw query parameters and combining them with filepath.Join without enforcing a storage-root constraint or stripping traversal sequences, the code creates a general-purpose file locator that attackers can drive using crafted paths.

Potential impact

  • An attacker may read sensitive configuration files (e.g., database connection strings, API keys).
  • An attacker could access SSH private keys or authorized_keys files readable by the server process.
  • JWT signing keys or other cryptographic secrets can be disclosed, enabling token forgery.
  • System files such as /etc/passwd may be read, aiding in reconnaissance and further attacks.
  • Application logs and other internal data sources could be exposed, increasing information leakage.

General mitigation guidance

Effective mitigation focuses on strictly constraining filesystem access to an intended storage root and treating all user-supplied paths as untrusted.

Common defensive patterns include:

  • Centralizing path resolution through a function that enforces a fixed base directory and rejects any path that resolves outside it.
  • Normalizing and canonicalizing incoming paths, then explicitly checking for traversal sequences or directory components that attempt to escape the allowed root.
  • Avoiding direct use of user input in Join or similar APIs without validation; instead, map logical identifiers to server-side paths.
  • Separating storage for secrets and configuration from application data directories and running the service with least-privilege filesystem permissions.
  • Designing endpoints to accept opaque file IDs or handles rather than raw filesystem paths, reducing the risk surface for traversal.

How teams detect issues like this

Organizations can detect path traversal patterns through:

  • Static analysis rules that flag uses of filesystem APIs (Open, Join, GetRealPath, etc.) with direct user-controlled input and no preceding normalization or root-bound checks.
  • Code review checklists that require verification of any path constructed from request parameters, ensuring containment within a defined base directory.
  • Security tests and fuzzing that automatically inject traversal sequences (../, ..\\, URL-encoded variants) into path-related parameters in APIs like /api/media/subtitles.
  • Runtime monitoring or logging that highlights suspicious access attempts to unexpected directories or files outside the configured storage root.
  • Integration of automated review tools that enforce policies around filesystem access patterns and highlight deviations from approved path-handling utilities.

Sources

SourceLink
github.comgithub.com/gtsteffaniak/filebrowser/commit/f3f4bbe80cb569d664174aea874d7bfa008c3b5a
github.comgithub.com/gtsteffaniak/filebrowser/security/advisories/GHSA-vvp7-h4fj-m28w

Frequently asked

questions

Yes. Any user who can authenticate to the FileBrowser Quantum interface and issue requests to /api/media/subtitles can exploit the flaw over the network, without needing direct shell or filesystem access.

Only an authenticated account is required; elevated roles or specific file permissions inside the application are not necessary. The vulnerability bypasses the normal authorization model by operating directly at the filesystem layer.

Implement a strict path resolution routine that:

  • Normalizes user-supplied paths,
  • Enforces a fixed base directory,
  • Rejects any request whose resolved path falls outside that directory,

and avoid exposing raw filesystem paths in the API by using server-side identifiers instead.

Adopt secure-by-default path handling utilities, mandate their use through coding standards, and include checks for path traversal in automated tests and code reviews. Combine this with least-privilege filesystem permissions so that, even if a path-handling mistake occurs, the service cannot read highly sensitive files.

Find out what's already
exploitable in your codebase.