CVE-2026-35605: Github.com/filebrowser/filebrowser/v2 File Browser Has An Access Vulnerability
MODERATECVE-2026-35605 is a MODERATE file browser has an access vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/filebrowser/filebrowser/v2 libraries in the Go ecosystem. The issue involves file browser has an access rule bypass via hasprefix without trailing separator in path matching. Remediation is available by upgrading affected packages to version 2.63.1.
CVE-2026-35605 at a Glance
How to Fix CVE-2026-35605
To remediate this vulnerability, upgrade all affected Github.com/filebrowser/filebrowser/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/filebrowser/filebrowser/v2 to 2.63.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/filebrowser/filebrowser/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-35605, inspect your project dependencies for Github.com/filebrowser/filebrowser/v2:
inspect dependencies for github.com/filebrowser/filebrowser/v2
Analyze the terminal output to locate any version of Github.com/filebrowser/filebrowser/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.63.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Github.com/filebrowser/filebrowser/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-35605 Affected Github.com/filebrowser/filebrowser/v2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/filebrowser/filebrowser/v2
|
Go |
< 2.63.1
|
2.63.1
|
References
Frequently Asked Questions
What is CVE-2026-35605?
Which Github.com/filebrowser/filebrowser/v2 versions are affected?
What version fixes CVE-2026-35605?
Is github.com/filebrowser/filebrowser/v2 affected?
What CWE is associated with CVE-2026-35605?
How can I check Go dependencies for CVE-2026-35605?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5q48-q4fm-g3m6",
"modified" : "2026-04-08T00:04:49Z",
"published" : "2026-04-08T00:04:49Z",
"aliases" : [ "CVE-2026-35605" ],
"summary" : "File Browser has an access rule bypass via HasPrefix without trailing separator in path matching",
"details" : "Hi,\n\nThe `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).\n\n## Details\n\nAt `rules/rules.go:29-35`:\n\n func (r *Rule) Matches(path string) bool {\n if r.Regex {\n return r.Regexp.MatchString(path)\n }\n return strings.HasPrefix(path, r.Path)\n }\n\nWhen 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.\n\nThe `Check()` function at `http/data.go:29-48` iterates all rules with last-match-wins semantics. No secondary validation exists beyond this prefix check.\n\n## PoC\n\nAdmin configures: allow rule `Path: \"/shared\"` for a restricted user.\n\nFilesystem contains:\n- `/shared/` (intended to be accessible)\n- `/shared_private/` (intended to be restricted)\n\nUser requests `/shared_private/secret.txt`:\n- `strings.HasPrefix(\"/shared_private/secret.txt\", \"/shared\")` returns true\n- Allow rule applies\n- Access granted to the unintended directory\n\n## Impact\n\nAuthenticated users can access files in sibling directories that share a common prefix with an allowed directory, bypassing the admin's intended access configuration.\n\n## Prior art\n\nPrior 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.\n\n## Suggested Fix\n\n func (r *Rule) Matches(path string) bool {\n if r.Regex {\n return r.Regexp.MatchString(path)\n }\n prefix := r.Path\n if prefix != \"/\" && !strings.HasSuffix(prefix, \"/\") {\n prefix += \"/\"\n }\n return path == r.Path || strings.HasPrefix(path, prefix)\n }\n\nKoda Reef\n\n---\n\n**Update:** Fix submitted as PR #5889.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/filebrowser/filebrowser/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.63.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-5q48-q4fm-g3m6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35605"
}, {
"type" : "WEB",
"url" : "https://github.com/filebrowser/filebrowser/pull/5889"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/filebrowser/filebrowser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-08T00:04:49Z",
"nvd_published_at" : "2026-04-07T17:16:34Z"
}
}