File Browser vulnerable to Username Enumeration via Timing Attack in /api/login
filebrowser
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/filebrowser/filebrowser Go |
| No fix yet |
| github.com/filebrowser/filebrowser/v2 Go |
|
|
filebrowser
| Product | Affected | Fixed in |
|---|---|---|
| github.com/filebrowser/filebrowser Go |
| No fix yet |
| github.com/filebrowser/filebrowser/v2 Go |
|
|
File Browser provides a file managing interface within a specified directory and can be used to upload, delete, preview, rename, and edit files. Prior to version 2.55.0, the JSONAuth. Auth function contains a logic flaw that allows unauthenticated attackers to enumerate valid usernames by measuring the response time of the /api/login endpoint. The vulnerability exists due to a "short-circuit" evaluation in the authentication logic. When a username is not found in the database, the function returns immediately. However, if the username does exist, the code proceeds to verify the password using bcrypt (users.CheckPwd), which is a computationally expensive operation designed to be slow. This difference in execution path creates a measurable timing discrepancy. Version 2.55.0 contains a patch for the issue.
From the CVE record · GitHub_M
File Browser's JSONAuth authentication logic responds faster when a username does not exist than when it does. An unauthenticated attacker can measure responses from the /api/login endpoint to enumerate valid usernames; no user interaction is required.
Anyone running github.com/filebrowser/filebrowser/v2 before 2.55.0 or any version of github.com/filebrowser/filebrowser should check their deployment.