CVE-2026-35605

CVE-2026-35605 is a medium-severity path traversal vulnerability in github.com/filebrowser/filebrowser/v2 (go), affecting versions < 2.63.1. It is fixed in 2.63.1.

Summary

Hi,

The Matches() function in rules/rules.go uses strings.HasPrefix() without a trailing directory separator when matching paths against access rules. A rule for /uploads also matches /uploads_backup/, granting or denying access to unintended directories. Verified against v2.62.2 (commit 860c19d).

Details

At rules/rules.go:29-35:

func (r *Rule) Matches(path string) bool {
    if r.Regex {
        return r.Regexp.MatchString(path)
    }
    return strings.HasPrefix(path, r.Path)
}

When a rule has Path: "/uploads", any path starting with /uploads matches, including /uploads_backup/secret.txt. The regex variant at line 31 uses proper matching, but the non-regex path uses a prefix check without ensuring the match ends at a directory boundary.

The Check() function at http/data.go:29-48 iterates all rules with last-match-wins semantics. No secondary validation exists beyond this prefix check.

PoC

Admin configures: allow rule Path: "/shared" for a restricted user.

Filesystem contains:

  • /shared/ (intended to be accessible)
  • /shared_private/ (intended to be restricted)

User requests /shared_private/secret.txt:

  • strings.HasPrefix("/shared_private/secret.txt", "/shared") returns true
  • Allow rule applies
  • Access granted to the unintended directory

Prior art

Prior advisories GHSA-4mh3-h929-w968 (path-based access control bypass) and GHSA-9f3r-2vgw-m8xp (path traversal in copy/rename) addressed related access control issues. This HasPrefix prefix-collision is a distinct, unreported variant.

Koda Reef

Update: Fix submitted as PR #5889.

Impact

Authenticated users can access files in sibling directories that share a common prefix with an allowed directory, bypassing the admin's intended access configuration.

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

Affected versions

github.com/filebrowser/filebrowser/v2 (< 2.63.1)

Security releases

github.com/filebrowser/filebrowser/v2 → 2.63.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

func (r *Rule) Matches(path string) bool {
if r.Regex {
return r.Regexp.MatchString(path)
}
prefix := r.Path
if prefix != "/" && !strings.HasSuffix(prefix, "/") {
prefix += "/"
}
return path == r.Path || strings.HasPrefix(path, prefix)
}

Frequently Asked Questions

  1. What is CVE-2026-35605? CVE-2026-35605 is a medium-severity path traversal vulnerability in github.com/filebrowser/filebrowser/v2 (go), affecting versions < 2.63.1. It is fixed in 2.63.1. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. Which versions of github.com/filebrowser/filebrowser/v2 are affected by CVE-2026-35605? github.com/filebrowser/filebrowser/v2 (go) versions < 2.63.1 is affected.
  3. Is there a fix for CVE-2026-35605? Yes. CVE-2026-35605 is fixed in 2.63.1. Upgrade to this version or later.
  4. Is CVE-2026-35605 exploitable, and should I be worried? Whether CVE-2026-35605 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-35605 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-35605? Upgrade github.com/filebrowser/filebrowser/v2 to 2.63.1 or later.

Other vulnerabilities in github.com/filebrowser/filebrowser/v2

CVE-2026-54090CVE-2026-54093CVE-2026-54094CVE-2026-54092CVE-2026-54096

Stop the waste.
Protect your environment with Kodem.