CVE-2026-32758 — Vulnerability in filebrowser/filebrowser/v2
File Browser has an Access Rule Bypass via Path Traversal in Copy/Rename Destination Parameter
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.52%). 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-32758 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
Description
The resourcePatchHandler in http/resource.go validates the destination path against configured access rules before the path is cleaned/normalized. The rules engine (rules/rules.go) uses literal string prefix matching (strings.HasPrefix) or regex matching against the raw path. The actual file operation (fileutils.Copy, patchAction) subsequently calls path.Clean() which resolves .. sequences, producing a different effective path than the one validated.
This allows an authenticated user with Create or Rename permissions to bypass administrator-configured deny rules by including .. (dot-dot) path traversal sequences in the destination query parameter of a PATCH request.
Steps to Reproduce
1. Verify the rule works normally
# This should return 403 Forbidden
curl -X PATCH \
-H "X-Auth: <alice_jwt>" \
"http://host/api/resources/public/test.txt?action=copy&destination=%2Frestricted%2Fcopied.txt"
2. Exploit the bypass
# This should succeed despite the deny rule
curl -X PATCH \
-H "X-Auth: <alice_jwt>" \
"http://host/api/resources/public/test.txt?action=copy&destination=%2Fpublic%2F..%2Frestricted%2Fcopied.txt"
3. Result
The file test.txt is copied to /restricted/copied.txt despite the deny rule for /restricted/.
Root Cause Analysis
In http/resource.go:209-257:
dst := r.URL.Query().Get("destination") // line 212
dst, err := url.QueryUnescape(dst) // line 214 — dst contains ".."
if !d.Check(src) || !d.Check(dst) { // line 215 — CHECK ON UNCLEANED PATH
return http.StatusForbidden, nil
}
In rules/rules.go:29-35:
func (r *Rule) Matches(path string) bool {
if r.Regex {
return r.Regexp.MatchString(path) // regex on literal path
}
return strings.HasPrefix(path, r.Path) // prefix on literal path
}
In fileutils/copy.go:12-17:
func Copy(afs afero.Fs, src, dst string, ...) error {
if dst = path.Clean("/" + dst); dst == "" { // CLEANING HAPPENS HERE, AFTER CHECK
return os.ErrNotExist
}
The rules check sees /public/../restricted/copied.txt (no match for /restricted/ prefix).
The file operation resolves it to /restricted/copied.txt (within the restricted path).
Secondary Issue
In the same handler, the error from url.QueryUnescape is checked after d.Check() runs (lines 214-220), meaning the rules check executes on a potentially malformed string if unescaping fails.
Impact
An authenticated user with Copy (Create) or Rename permission can write or move files into any path within their scope that is protected by deny rules. This bypasses both:
- Prefix-based rules:
strings.HasPrefixon uncleaned path misses the match - Regex-based rules: Standard patterns like
^/restricted/.*fail on uncleaned path
Cannot be used to:
- Escape the user's BasePathFs scope (afero prevents this)
- Read from restricted paths (GET handler uses cleaned
r.URL.Path)
Suggested Fix
Clean the destination path before the rules check:
dst, err := url.QueryUnescape(dst)
if err != nil {
return errToStatus(err), err
}
dst = path.Clean("/" + dst)
src = path.Clean("/" + src)
if !d.Check(src) || !d.Check(dst) {
return http.StatusForbidden, nil
}
if dst == "/" || src == "/" {
return http.StatusForbidden, nil
}
Advisory Timeline
- First published March 16, 2026 (255 days ago).
- Last revised March 30, 2026 — 14 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/filebrowser/filebrowser/v2@v2.62.0
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.62.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
References
- https://github.com/filebrowser/filebrowser/security/advisories/GHSA-9f3r-2vgw-m8xpWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-32758ADVISORY
- https://github.com/filebrowser/filebrowser/commit/4bd7d69c82163b201a987e99c0c50d7ecc6ee5f1WEB
- https://github.com/filebrowser/filebrowserPACKAGE
- https://github.com/filebrowser/filebrowser/releases/tag/v2.62.0WEB
Frequently Asked Questions
- What is CVE-2026-32758?
- File Browser has an Access Rule Bypass via Path Traversal in Copy/Rename Destination Parameter. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.5/10).
- How do I check if my project is affected by CVE-2026-32758?
- CVE-2026-32758 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-32758 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 37.1% 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-29188CRITICAL
File Browser's TUS Delete Endpoint Bypasses Delete Permission Check
- CVE-2026-35607HIGH
File Browser: Proxy auth auto-provisioned users inherit Execute permission and Commands
- CVE-2026-62685HIGH
File Browser: Colliding username normalization gives two users the same home directory
- CVE-2026-62684LOW
File Browser: Share API exposes the password hash and bypass token
- CVE-2026-28492
FileBrowser has Path Traversal in Public Share Links that Exposes Files Outside Shared Directory in github.com/filebrowser/filebrowser
- CVE-2026-29188
File Browser's TUS Delete Endpoint Bypasses Delete Permission Check in github.com/filebrowser/filebrowser
- CVE-2026-32760
File Browser Signup Grants Admin When Default Permissions Include Admin in github.com/filebrowser/filebrowser
- CVE-2026-32759
File Browser TUS Negative Upload-Length Fires Post-Upload Hooks Prematurely in github.com/filebrowser/filebrowser