Skip to main content

CVE-2026-28492 — FileBrowser has Path Traversal in...

HIGH

FileBrowser has Path Traversal in Public Share Links that Exposes Files Outside Shared Directory

Published March 2, 2026Updated March 23, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.54%). 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-28492 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

Summary

When a user creates a public share link for a directory, the withHashFile middleware in http/public.go (line 59) uses filepath.Dir(link.Path) to compute the BasePathFs root. This sets the filesystem root to the parent directory instead of the shared directory itself, allowing anyone with the share link to browse and download files from all sibling directories.

Details

In http/public.go lines 52-64, the withHashFile function handles public share link requests:

basePath := link.Path    // e.g. "/documents/shared"
filePath := ""

if file.IsDir {
    basePath = filepath.Dir(basePath)  // BUG: becomes "/documents" (parent!)
    filePath = ifPath
}

d.user.Fs = afero.NewBasePathFs(d.user.Fs, basePath)

When a directory at /documents/shared is shared, filepath.Dir("/documents/shared") evaluates to "/documents". The BasePathFs is then rooted at the parent directory /documents/, giving the share link access to everything under /documents/ - not just the intended /documents/shared/.

This affects both publicShareHandler (directory listing via /api/public/share/{hash}) and publicDlHandler (file download via /api/public/dl/{hash}/path).

PoC

  1. Set up filebrowser with a user whose scope contains:
    • /documents/shared/public-file.txt (intended to be shared)
    • /documents/secrets/passwords.txt (NOT intended to be shared)
    • /documents/private/financial.csv (NOT intended to be shared)
  2. Create a public share link for the directory /documents/shared (via POST /api/share/documents/shared)
  3. Access the share link: GET /api/public/share/{hash}
    • Expected: Lists only contents of /documents/shared/
    • Actual: Lists contents of /documents/ (parent), revealing secrets/, private/, and shared/ directories
  4. Download sibling files: GET /api/public/dl/{hash}/secrets/passwords.txt
    • Expected: 404 or 403 (file outside share scope)
    • Actual: 200 with file contents (sibling file downloaded successfully) Standalone Go test reproducing the exact vulnerable code path with afero.NewBasePathFs:
func TestShareScopeEscape(t *testing.T) {
    baseFs := afero.NewMemMapFs()
    afero.WriteFile(baseFs, "/documents/shared/public.txt", []byte("public"), 0644)
    afero.WriteFile(baseFs, "/documents/secrets/passwords.txt", []byte("admin:hunter2"), 0644)

    linkPath := "/documents/shared"
    basePath := filepath.Dir(linkPath) // BUG: "/documents"
    scopedFs := afero.NewBasePathFs(baseFs, basePath)

    // Sibling file is accessible through the share:
    f, err := scopedFs.Open("/secrets/passwords.txt")
    // err is nil - file accessible! Content: "admin:hunter2"
}

This test passes, confirming the vulnerability.

Impact

Unauthenticated information disclosure (CWE-200, CWE-706). Anyone with a public share link for a directory can:

  • Browse all sibling directories and files of the shared directory
    • Download any file within the parent directory scope
    • This works without authentication (public shares) or after providing the share password (password-protected shares) All filebrowser v2.x installations that use directory sharing are affected.

Recommended Fix

Remove the filepath.Dir() call and use link.Path directly as the BasePathFs root:

if file.IsDir {
    // Don't change basePath - keep it as link.Path
    filePath = ifPath
}
d.user.Fs = afero.NewBasePathFs(d.user.Fs, basePath)

Affected commit: e3d00d591b567a8bfe3b02e42ba586859002c77d (latest) File: http/public.go, line 59

Advisory Timeline

  • First published March 2, 2026 (269 days ago).
  • Last revised March 23, 2026 — 20 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/filebrowser/filebrowser/v2 to 2.61.0 or later
go get github.com/filebrowser/filebrowser/v2@v2.61.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.61.0

Vulnerability Classification

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

  • CWE-200
    Information ExposureMITRE

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
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-28492?
FileBrowser has Path Traversal in Public Share Links that Exposes Files Outside Shared Directory. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 6.5/10).
How do I check if my project is affected by CVE-2026-28492?
CVE-2026-28492 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-28492 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.54%
EPSS percentile: 38.7

This is a below-median EPSS score — only 38.7% 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-mr74-928f-rw69
GO-2026-4585

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-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-32758

    File Browser has an Access Rule Bypass via Path Traversal in Copy/Rename Destination Parameter 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