Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-4mh3-h929-w968

Опубликовано: 10 фев. 2026
Источник: github
Github: Прошло ревью
CVSS3: 8.1

Описание

File Browser has a Path-Based Access Control Bypass via Multiple Leading Slashes in URL

Summary

An authenticated user can bypass the application's "Disallow" file path rules by modifying the request URL. By adding multiple slashes (e.g., //private/) to the path, the authorization check fails to match the rule, while the underlying filesystem resolves the path correctly, granting unauthorized access to restricted files.

Details

The vulnerability allows users to bypass "Disallow" rules defined by administrators.

The issue stems from how the application handles URL path normalization and rule matching:

  1. Router Configuration: The router in http/http.go is configured with r.SkipClean(true). This prevents the automatic collapse of multiple slashes (e.g., // becoming /) before the request reaches the handler.
  2. Insecure Rule Matching: The rule enforcement logic in rules/rules.go relies on a simple string prefix match: strings.HasPrefix(path, r.Path). If a rule disallows /private, a request for //private fails this check because //private does not strictly start with /private.
  3. Filesystem Resolution: After bypassing the rule check, the non-normalized path is passed to the filesystem. The filesystem treats the multiple slashes as a single separator, successfully resolving //private/secret.txt and serving the file.

PoC

Python minimal PoC

The following steps demonstrate the vulnerability:

  1. Setup:
  • Admin user creates a folder /private and adds a file /private/secret.txt. Screenshot_20260123_151608
Screenshot_20260123_151551 - Admin adds a Disallow rule for user bob on the path /private. Screenshot_20260123_151502
  1. Verification:
  • User bob requests GET /api/resources/private/secret.txt.
  • Server responds: 403 Forbidden. Screenshot_20260123_154446
  1. Exploit:
  • User bob requests GET /api/resources//private/secret.txt.
  • Server responds: 200 OK (Bypass successful). Screenshot_20260123_154544
Screenshot_20260123_154618

Impact

This vulnerability impacts the confidentiality and integrity of data stored in filebrowser.

  • Confidentiality: Users can read files they are explicitly forbidden from accessing.
  • Integrity: If the user has general write permissions but is restricted from specific directories via rules, they can bypass these restrictions to rename, delete, or modify files.

Пакеты

Наименование

github.com/filebrowser/filebrowser/v2

go
Затронутые версииВерсия исправления

<= 2.57.0

2.57.1

EPSS

Процентиль: 39%
0.00469
Низкий

8.1 High

CVSS3

Дефекты

CWE-706
CWE-863

Связанные уязвимости

CVSS3: 8.1
nvd
7 месяцев назад

File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit files. Prior to 2.57.1, an authenticated user can bypass the application's "Disallow" file path rules by modifying the request URL. By adding multiple slashes (e.g., //private/) to the path, the authorization check fails to match the rule, while the underlying filesystem resolves the path correctly, granting unauthorized access to restricted files. This vulnerability is fixed in 2.57.1.

EPSS

Процентиль: 39%
0.00469
Низкий

8.1 High

CVSS3

Дефекты

CWE-706
CWE-863