Skip to main content

CVE-2026-32758 — Vulnerability in filebrowser/filebrowser/v2

MEDIUM

File Browser has an Access Rule Bypass via Path Traversal in Copy/Rename Destination Parameter

Published March 16, 2026Updated March 30, 2026Source: OSV

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.

Check my go.sum

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.HasPrefix on 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
Update github.com/filebrowser/filebrowser/v2 to 2.62.0 or later
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).

PackageFixed In
github.com/filebrowser/filebrowser/v2 Go · Affected: All versions2.62.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-22
    Path TraversalMITRE
  • CWE-863
    Incorrect AuthorizationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

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

CVSS Score
6.5

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.52%
EPSS percentile: 37.1

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

GHSA-9f3r-2vgw-m8xp
GO-2026-4711

Related CVEs

  • CVE-2026-29188
    CRITICAL

    File Browser's TUS Delete Endpoint Bypasses Delete Permission Check

  • CVE-2026-35607
    HIGH

    File Browser: Proxy auth auto-provisioned users inherit Execute permission and Commands

  • CVE-2026-62685
    HIGH

    File Browser: Colliding username normalization gives two users the same home directory

  • CVE-2026-62684
    LOW

    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

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum