File Browser has an Access Rule Bypass via Path Traversal in Copy/Rename Destination Parameter
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.
```bash
# 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"
```
```bash
# 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"
```
The file test.txt is copied to /restricted/copied.txt despite the deny rule for /restricted/.
In http/resource.go:209-257:
```go
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:
```go
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:
```go
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).
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.
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:
strings.HasPrefix on uncleaned path misses the match^/restricted/.* fail on uncleaned pathCannot be used to:
r.URL.Path)Clean the destination path before the rules check:
```go
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
}
```
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.
The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
CVE-2026-32758 is classified as CWE-22: Path Traversal. A file path built from user input is not confined to the intended directory, letting an attacker reach files elsewhere on the filesystem.
CVE-2026-32758 is recorded against 3 packages.
Published on 20 March 2026 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
github.com
github.com
github.com
filebrowser has other advisories on record. If you are patching this one, these are worth checking on the same host:
These advisories are the same class of weakness (CWE-22: Path Traversal) in other software:
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| filebrowser | — | 2.62.0 |
| github.com/filebrowser/filebrowser | — | — |
| github.com/filebrowser/filebrowser/v2 | — | — |
References
Similar Threats
Vulnerability Monitoring
CVE-2026-32758 is rated CVSS 6.5 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.
Set Up Free Alerts →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.