Skip to content

File tree

9 files changed

+562
-0
lines changed

9 files changed

+562
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-5q48-q4fm-g3m6",
4+
"modified": "2026-04-08T00:04:49Z",
5+
"published": "2026-04-08T00:04:49Z",
6+
"aliases": [
7+
"CVE-2026-35605"
8+
],
9+
"summary": "File Browser has an access rule bypass via HasPrefix without trailing separator in path matching",
10+
"details": "Hi,\n\nThe `Matches()` function in `rules/rules.go` uses `strings.HasPrefix()` without a trailing directory separator when matching paths against access rules. A rule for `/uploads` also matches `/uploads_backup/`, granting or denying access to unintended directories. Verified against v2.62.2 (commit 860c19d).\n\n## Details\n\nAt `rules/rules.go:29-35`:\n\n func (r *Rule) Matches(path string) bool {\n if r.Regex {\n return r.Regexp.MatchString(path)\n }\n return strings.HasPrefix(path, r.Path)\n }\n\nWhen a rule has `Path: \"/uploads\"`, any path starting with `/uploads` matches, including `/uploads_backup/secret.txt`. The regex variant at line 31 uses proper matching, but the non-regex path uses a prefix check without ensuring the match ends at a directory boundary.\n\nThe `Check()` function at `http/data.go:29-48` iterates all rules with last-match-wins semantics. No secondary validation exists beyond this prefix check.\n\n## PoC\n\nAdmin configures: allow rule `Path: \"/shared\"` for a restricted user.\n\nFilesystem contains:\n- `/shared/` (intended to be accessible)\n- `/shared_private/` (intended to be restricted)\n\nUser requests `/shared_private/secret.txt`:\n- `strings.HasPrefix(\"/shared_private/secret.txt\", \"/shared\")` returns true\n- Allow rule applies\n- Access granted to the unintended directory\n\n## Impact\n\nAuthenticated users can access files in sibling directories that share a common prefix with an allowed directory, bypassing the admin's intended access configuration.\n\n## Prior art\n\nPrior advisories GHSA-4mh3-h929-w968 (path-based access control bypass) and GHSA-9f3r-2vgw-m8xp (path traversal in copy/rename) addressed related access control issues. This HasPrefix prefix-collision is a distinct, unreported variant.\n\n## Suggested Fix\n\n func (r *Rule) Matches(path string) bool {\n if r.Regex {\n return r.Regexp.MatchString(path)\n }\n prefix := r.Path\n if prefix != \"/\" && !strings.HasSuffix(prefix, \"/\") {\n prefix += \"/\"\n }\n return path == r.Path || strings.HasPrefix(path, prefix)\n }\n\nKoda Reef\n\n---\n\n**Update:** Fix submitted as PR #5889.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/filebrowser/filebrowser/v2"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "2.63.1"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-5q48-q4fm-g3m6"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35605"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/filebrowser/filebrowser/pull/5889"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/filebrowser/filebrowser"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-22"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-08T00:04:49Z",
63+
"nvd_published_at": "2026-04-07T17:16:34Z"
64+
}
65+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-67cg-cpj7-qgc9",
4+
"modified": "2026-04-08T00:05:09Z",
5+
"published": "2026-04-08T00:05:09Z",
6+
"aliases": [
7+
"CVE-2026-35606"
8+
],
9+
"summary": "File Browser discloses text file content via /api/resources endpoint bypassing Perm.Download check",
10+
"details": "## Summary\n\nThe `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.\n\nConfirmed on v2.62.2 (commit 860c19d).\n\n## Root Cause\n\n`http/resource.go` line 26-33 hardcodes `Content: true` in the FileOptions without checking download permission:\n\n file, err := files.NewFileInfo(&files.FileOptions{\n ...\n Content: true, // Always loads text content, no permission check\n })\n\nLines 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.\n\nCompare with the three protected endpoints:\n\n // raw.go:83-85\n if !d.user.Perm.Download { return http.StatusAccepted, nil }\n\n // preview.go:38-40\n if !d.user.Perm.Download { return http.StatusAccepted, nil }\n\n // subtitle.go:13-15\n if !d.user.Perm.Download { return http.StatusAccepted, nil }\n\n## PoC\n\nTested on filebrowser v2.62.2, built from HEAD.\n\n # Create user with download=false via CLI\n filebrowser users add restricted testuser123456 --perm.download=false\n\n # Login\n TOKEN=$(curl -s http://HOST/api/login -d '{\"username\":\"restricted\",\"password\":\"testuser123456\"}')\n\n # BLOCKED: /api/raw correctly enforces download permission\n curl -s -w \"\\nHTTP: %{http_code}\" http://HOST/api/raw/secret.txt -H \"X-Auth: $TOKEN\"\n # → 202 Accepted (empty body)\n\n # BYPASS 1: /api/resources with X-Encoding returns raw file content\n curl -s http://HOST/api/resources/secret.txt -H \"X-Auth: $TOKEN\" -H \"X-Encoding: true\"\n # → 200 OK, body: SECRET_PASSWORD=hunter2\n\n # BYPASS 2: /api/resources JSON includes content field\n curl -s http://HOST/api/resources/secret.txt -H \"X-Auth: $TOKEN\" | jq .content\n # → \"SECRET_PASSWORD=hunter2\\n\"\n\n## Impact\n\nA 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.\n\nThis 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.\n\n## Suggested Fix\n\nMatch the existing endpoint behavior (HTTP 202 for denied downloads):\n\n Content: d.user.Perm.Download, // Only load content when permitted\n\nAnd add a guard before the X-Encoding raw byte path, matching the existing 202 pattern:\n\n if !d.user.Perm.Download {\n return http.StatusAccepted, nil\n }\n\n---\n\n**Update:** Fix submitted as PR #5891.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/filebrowser/filebrowser/v2"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "2.63.1"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-67cg-cpj7-qgc9"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35606"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/filebrowser/filebrowser"
50+
}
51+
],
52+
"database_specific": {
53+
"cwe_ids": [
54+
"CWE-862"
55+
],
56+
"severity": "MODERATE",
57+
"github_reviewed": true,
58+
"github_reviewed_at": "2026-04-08T00:05:09Z",
59+
"nvd_published_at": "2026-04-07T17:16:34Z"
60+
}
61+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-69x8-hrgq-fjj8",
4+
"modified": "2026-04-08T00:04:12Z",
5+
"published": "2026-04-08T00:04:12Z",
6+
"aliases": [],
7+
"summary": "LiteLLM: Password hash exposure and pass-the-hash authentication bypass",
8+
"details": "### Impact\n\nThree issues combine into a full authentication bypass chain:\n\n1. Weak hashing: User passwords are stored as unsalted SHA-256 hashes, making them vulnerable to rainbow table attacks and trivially identifying users with identical passwords.\n2. Hash exposure: Multiple API endpoints (/user/info, /user/update, /spend/users) return the password hash field in responses to any authenticated user regardless of role. Plaintext passwords could also potentially be exposed in certain scenarios.\n4. Pass-the-hash: The /v2/login endpoint accepts the raw SHA-256 hash as a valid password without re-hashing, allowing direct login with a stolen\n\nAn already authenticated user can retrieve another user's password hash from the API and use it to log in as that user. This enables full privilege escalation in three HTTP requests.\n\n### Patches\n\nFixed in v1.83.0. Passwords are now hashed with scrypt (random 16-byte salt, n=16384, r=8, p=1). Password hashes are stripped from all API responses. Existing SHA-256 hashes are transparently migrated on next login.",
9+
"severity": [
10+
{
11+
"type": "CVSS_V4",
12+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "PyPI",
19+
"name": "litellm"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "1.83.0"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/BerriAI/litellm/security/advisories/GHSA-69x8-hrgq-fjj8"
40+
},
41+
{
42+
"type": "PACKAGE",
43+
"url": "https://github.com/BerriAI/litellm"
44+
}
45+
],
46+
"database_specific": {
47+
"cwe_ids": [
48+
"CWE-200",
49+
"CWE-327",
50+
"CWE-916"
51+
],
52+
"severity": "HIGH",
53+
"github_reviewed": true,
54+
"github_reviewed_at": "2026-04-08T00:04:12Z",
55+
"nvd_published_at": null
56+
}
57+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-7526-j432-6ppp",
4+
"modified": "2026-04-08T00:05:12Z",
5+
"published": "2026-04-08T00:05:12Z",
6+
"aliases": [
7+
"CVE-2026-35607"
8+
],
9+
"summary": "File Browser: Proxy auth auto-provisioned users inherit Execute permission and Commands",
10+
"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.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/filebrowser/filebrowser/v2"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "2.63.1"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-7526-j432-6ppp"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35607"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/filebrowser/filebrowser/pull/5890"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/filebrowser/filebrowser"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-269"
59+
],
60+
"severity": "HIGH",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-08T00:05:12Z",
63+
"nvd_published_at": "2026-04-07T17:16:34Z"
64+
}
65+
}

0 commit comments

Comments
 (0)