6.3medium
File Browser has an access rule bypass via HasPrefix without trailing separator in path matching
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.42% (higher than 37% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-5q48-q4fm-g3m6GO-2026-5150
Description
File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. Prior to 2.63.1, 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. This vulnerability is fixed in 2.63.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| filebrowser filebrowser | < 2.63.1, before 2.63.1 | CVE List, NVD |
| github.com/filebrowser/filebrowser/v2 (Go) | before 2.63.1 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/filebrowser/filebrowser (Go) | all versions | Go Vulnerability Database |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| CISA-ADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. Prior to 2.63.1, 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. This vulnerability is fixed in 2.63.1.
GitHub Advisory Database
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.
Go Vulnerability Database
File Browser has an access rule bypass via HasPrefix without trailing separator in path matching in github.com/filebrowser/filebrowser
References
| https://github.com/filebrowser/filebrowser/security/advisories/GHSA-5q48-q4fm-g3m6 | advisory, exploit, vendor-advisory, web | |
| https://github.com/filebrowser/filebrowser/pull/5889 | fix, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-35605 | advisory | |
| https://github.com/filebrowser/filebrowser | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-35605 changed 2026-04-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5q48-q4fm-g3m6 changed 2026-06-25 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5150 changed 2026-06-25 | CC-BY-4.0 |
| NVD | CVE-2026-35605 changed 2026-06-17 | Public domain |