CVE-2026-35605 — Vulnerability in filebrowser/filebrowser/v2
File Browser has an access rule bypass via HasPrefix without trailing separator in path matching
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.47%). Schedule for your next planned update.
Does your project use an affected github.com/filebrowser/filebrowser/v2 version?
Paste your go.sum to check it for CVE-2026-35605 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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
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.
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.
Suggested Fix
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)
}
Koda Reef
Update: Fix submitted as PR #5889.
Advisory Timeline
- First published April 8, 2026 (232 days ago).
- Last revised June 25, 2026 — 79 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/filebrowser/filebrowser/v2@v2.63.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/filebrowser/filebrowser/v2 Go · Affected: All versions | 2.63.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.7 score means for each attack dimension.
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is CVE-2026-35605?
- File Browser has an access rule bypass via HasPrefix without trailing separator in path matching. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 3.7/10).
- How do I check if my project is affected by CVE-2026-35605?
- CVE-2026-35605 affects github.com/filebrowser/filebrowser/v2. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-35605 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation is difficult, or the impact is minor.
This is a below-median EPSS score — only 32.9% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-54089CRITICAL
File Browser: Authentication Bypass via Proxy Auth Header Forgery
- CVE-2025-52902
filebrowser allows Stored Cross-Site Scripting through the Markdown preview function in github.com/filebrowser/filebrowser
- CVE-2025-52900
filebrowser Sets Insecure File Permissions in github.com/filebrowser/filebrowser
- CVE-2025-52903
filebrowser Allows Shell Commands to Spawn Other Commands in github.com/filebrowser/filebrowser
- CVE-2026-35604
File Browser share links remain accessible after Share/Download permissions are revoked in github.com/filebrowser/filebrowser
- CVE-2026-54092
File Browser has a DoS Vulnerability via Public Login API in github.com/filebrowser/filebrowser
- CVE-2026-34528
File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution in github.com/filebrowser/filebrowser
- CVE-2026-34530
File Browser vulnerable to Stored Cross-site Scripting via text/template branding injection in github.com/filebrowser/filebrowser