/

CVE-2026-35606

Severity:

HIGH RISK

(7.5)

Missing Authorization in File Browser Text Content Handler

CVE-2026-35606

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Information Disclosure

Severity:

HIGH RISK

(7.5)

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

File Browser versions prior to 2.63.1 expose a missing authorization check in the resourceGetHandler, which serves full text file contents without honoring the Perm.Download permission flag.

Users who are configured with download: false can still read any text file within their allowed directory scope via specific bypass paths, effectively gaining read access that should have been denied.

Affected context

This issue occurs in File Browser deployments where fine-grained permissions are used to restrict file downloads via the Perm.Download flag.

While endpoints such as /api/raw, /api/preview, and /api/subtitle correctly enforce this permission, the resourceGetHandler in http/resource.go does not, yet still returns full text content.

The risk is most pronounced in multi-user or shared instances where some users are intentionally prevented from downloading or viewing certain file contents but still have general interface access within a directory scope.

Exploit preconditions

  • Attack surface: HTTP API / web interface of a running File Browser instance.
  • Required access: Valid user account or session that:
  • Has access to a specific directory or file scope.
  • Has download: false configured (intended to restrict content download).
  • Trigger point: Invocation of the resourceGetHandler endpoint or its equivalent bypass paths for text content, instead of the correctly protected content-serving endpoints.
  • Why exploitation is possible: The handler responsible for returning text file content lacks an authorization check on the Perm.Download flag, allowing content to be served as long as the user can reach the resource, even if their permissions explicitly forbid downloads.

Why this happens

The vulnerability stems from an inconsistent authorization model, where one code path that serves file content omits a critical permission check required elsewhere.

In File Browser, most content-serving endpoints correctly validate the Perm.Download flag before returning data.

However, resourceGetHandler returns text file content without performing the same permission verification, creating a "hole" in the access control logic.

This aligns with CWE-862: Missing Authorization, where an application fails to enforce access control on a resource or operation, despite having a defined permission mechanism.

Potential impact

  • Users with download: false can read full contents of any text file within their allowed directory scope.
  • Exposure of sensitive configuration data, logs, or documents that administrators intended to keep non-downloadable.
  • Leakage of credentials, tokens, or API keys stored in text-based files within the user's scope.
  • Undermining of organizational data governance or compliance policies that rely on restricted download permissions.

General mitigation guidance

Effective mitigation focuses on consistent, centralized authorization checks for all content-serving paths:

  • Ensure all handlers that return file data consult the same permission model, including the Perm.Download flag, before streaming or rendering content.
  • Adopt a security-by-default approach where handlers deny access unless explicit checks succeed, reducing the chance that new endpoints omit authorization.
  • Factor out authorization logic into shared middleware or helper functions so that every endpoint uses the same access-control routine rather than duplicating checks.
  • Use least-privilege permission configurations for users, limiting their scope only to directories and files that are appropriate for their role, even if download checks fail.
  • Regularly review permission semantics and UI/UX to ensure administrators' expectations (e.g., "download disabled means content cannot be read in full") match the actual backend enforcement.

How teams detect issues like this

Detection efforts can rely on a combination of code review and behavioral monitoring:

  • Static code analysis: Search for handlers that access or stream file contents without invoking shared authorization routines or checking the relevant permission flags.
  • Code review patterns: During pull requests, verify that every new API endpoint performing file reads explicitly enforces Perm.Download or a higher-level capability check, ideally through centralized middleware.
  • Access logging and anomaly detection: Examine logs for requests from users with download: false accessing endpoints that return full file content; flag or alert on unexpected response sizes or MIME types for restricted accounts.
  • Security testing and policy enforcement: Incorporate authorization test cases into automated integration tests to simulate low-privilege users accessing various content endpoints, ensuring that permission constraints are consistently applied.

Sources

SourceLink
github.comgithub.com/filebrowser/filebrowser/security/advisories/GHSA-67cg-cpj7-qgc9

Frequently asked

questions

Yes, if a File Browser instance is exposed over the internet and a user account is provisioned with download: false, that user can remotely exploit the missing authorization check to read text file contents within their allowed scope.

Typically yes. Exploitation assumes a valid user whose access is limited by the Perm.Download flag.

The vulnerability allows that user to bypass a specific restriction, not to access files outside their assigned directory scope.

The safest pattern is to centralize authorization logic and ensure that every endpoint that serves file content consults the same permission checks, including Perm.Download, before responding.

Handlers should default to denying access when authorization information is missing or ambiguous.

Prevention relies on:

  • Using common middleware or helper functions for authorization so that new handlers cannot bypass checks unintentionally.
  • Adding automated tests that verify that restricted users cannot read or download content via any endpoint.
  • Including authorization review as a specific checklist item in code reviews and enforcing static analysis rules that flag file-serving code paths without explicit permission checks.
Find out what's already
exploitable in your codebase.