{"id":"GHSA-7526-j432-6ppp","summary":"File Browser: Proxy auth auto-provisioned users inherit Execute permission and Commands","details":"## Summary\n\nThe 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.\n\nConfirmed on v2.62.2 (commit 860c19d).\n\n## Root Cause\n\n`auth/proxy.go` `createUser()` applies defaults without restriction:\n\n    user := &users.User{\n        Username:     username,\n        Password:     hashedRandomPassword,\n        LockPassword: true,\n    }\n    setting.Defaults.Apply(user)\n    // No restriction on Execute, Commands, or Admin\n\nCompare with `http/auth.go` signup handler (lines 170-178):\n\n    d.settings.Defaults.Apply(user)\n    user.Perm.Admin = false\n    // Self-registered users should not inherit execution capabilities\n    // from default settings, regardless of what the administrator has\n    // configured as the default.\n    user.Perm.Execute = false\n    user.Commands = []string{}\n\nThe 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.\n\n## PoC\n\nTested on filebrowser v2.62.2, built from HEAD.\n\n    # Configure with proxy auth, default commands, and exec\n    filebrowser config set --auth.method=proxy --auth.header=X-Remote-User \\\n      --commands \"git,ls,cat,id\"\n\n    # Login as admin and verify defaults have execute=true, commands set\n    ADMIN_TOKEN=$(curl -s http://HOST/api/login -H \"X-Remote-User: admin\")\n\n    # Auto-create new user via proxy header\n    PROXY_TOKEN=$(curl -s http://HOST/api/login -H \"X-Remote-User: newproxyuser\")\n\n    # Check permissions\n    curl -s http://HOST/api/users -H \"X-Auth: $ADMIN_TOKEN\" | jq '.[] | select(.username==\"newproxyuser\") | {execute: .perm.execute, commands}'\n\nResult:\n\n    {\n      \"execute\": true,\n      \"commands\": [\"git\", \"ls\", \"cat\", \"id\"]\n    }\n\nThe auto-created proxy user inherited Execute and the full Commands list. A user created via signup would have `execute: false` and `commands: []`.\n\n## Impact\n\nIn 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.\n\nThis 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.\n\n## Preconditions\n\n- Proxy auth enabled (`--auth.method=proxy`)\n- Exec not disabled\n- Default settings include non-empty Commands (admin-configured)\n\n## Suggested Fix\n\nApply the same restrictions as the signup handler:\n\n    setting.Defaults.Apply(user)\n    user.Perm.Admin = false\n    user.Perm.Execute = false\n    user.Commands = []string{}\n\n---\n\n**Update:** Fix submitted as PR #5890.","aliases":["CVE-2026-35607"],"modified":"2026-04-08T00:23:51.359726Z","published":"2026-04-08T00:05:12Z","database_specific":{"severity":"HIGH","github_reviewed_at":"2026-04-08T00:05:12Z","nvd_published_at":"2026-04-07T17:16:34Z","github_reviewed":true,"cwe_ids":["CWE-269"]},"references":[{"type":"WEB","url":"https://github.com/filebrowser/filebrowser/security/advisories/GHSA-7526-j432-6ppp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35607"},{"type":"WEB","url":"https://github.com/filebrowser/filebrowser/pull/5890"},{"type":"PACKAGE","url":"https://github.com/filebrowser/filebrowser"}],"affected":[{"package":{"name":"github.com/filebrowser/filebrowser/v2","ecosystem":"Go","purl":"pkg:golang/github.com/filebrowser/filebrowser/v2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.63.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-7526-j432-6ppp/GHSA-7526-j432-6ppp.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}