Описание
File Browser's password protection of links is bypassable
Summary
Files managed by the File Browser can be shared with a link to external persons. While the application allows protecting those links with a password, the implementation is error-prone, making an incidental unprotected sharing of a file possible.
Impact
File owners might rest in the assumption that their shared files are only accessible to persons knowing the defined password, giving them a false sense of security. Meanwhile, attackers gaining access to the unprotected link can use this information alone to download the possibly sensitive file.
Vulnerability Description
When sharing a file, the user is presented with a dialog asking for an optional password to protect the file share. The assumption of the user at this point would be, that the shared file won't be accessible without knowledge of the password. After clicking on SHARE the following dialog opens allowing the file's owner to copy the share-link:
In fact, there is not one, but two links offered: A Download Link and an unnamed second one. They have the following format:
- http://filebrowser.local:8080/share/6Gtw0xAw
- http://filebrowser.local:8080/api/public/dl/6Gtw0xAw/dummy1.pdf?token=voDK6j[...]
Apparently, the first of the two share links is that one that users are supposed to actually share, while the second one is a direct download link not protected by the password. This behavior is not documented anywhere or explained in the GUI, though.
There are multiple scenarios how an attacker might gain access to the unprotected link and, in consequence, to the shared file:
- The file owner might incidentally share the second link instead of the first one, making it accessible to anyone having read access to the messaging system used (e.g., a mailserver).
- After the legitimate receiver of the share has used the password, the unprotected link will get linked in multiple locations like the browser history or the log of a proxy server used.
Proof of Concept
Using the first link results in an authorization error if no password is provided, as expected:
Only if the password is provided (via the X-SHARE-PASSWORD header), a proper response is given:
But it does not return the actual file content but rather an access token. This is the very same token that is already part of the second share URL and is used by the web application to recreate the actual download URL. If you are in possession of that one, no further password check is performed, and the content of the file is returned:
Recommended Countermeasures
A short time solution would be to simple remove the second link from the GUI when a password protected share is created. Doing so will be a proper defense against user errors, but it will still leave unprotected links in various logs. A thorough fix has to eliminate the unprotected links completely, access to the file must only be given to requests containing the share password.
Timeline
2025-03-27Identified the vulnerability in version 2.32.02025-04-11Contacted the project2025-04-29Vulnerability disclosed to the project2025-06-25Uploaded advisories to the project's GitHub repository2025-06-25CVE ID assigned by GitHub2025-06-29Mitigation of user error released in version 2.34.22025-06-29Issue #5239 opened to track a more thorough fix of the feature
References
Credits
- Mathias Tausig (SBA Research)
Ссылки
- https://github.com/filebrowser/filebrowser/security/advisories/GHSA-3v48-283x-f2w4
- https://nvd.nist.gov/vuln/detail/CVE-2025-52996
- https://github.com/filebrowser/filebrowser/issues/5239
- https://github.com/sbaresearch/advisories/tree/public/2025/SBA-ADV-20250327-02_Filebrowser_Password_Protection_Of_Links_Bypassable
- https://pkg.go.dev/vuln/GO-2025-3790
Пакеты
github.com/filebrowser/filebrowser/v2
<= 2.42.1
Отсутствует
github.com/filebrowser/filebrowser
<= 1.11.0
Отсутствует
Связанные уязвимости
File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit files. In versions 2.32.0 and prior, the implementation of password protected links is error-prone, resulting in potential unprotected sharing of a file through a direct download link. This link can either be shared unknowingly by a user or discovered from various locations such as the browser history or the log of a proxy server used. At time of publication, no known patched versions are available.
Уязвимость веб-менеджера для управления файлами и каталогами File Browser, связанная с обходом аутентификации в силу исходной ошибки, позволяющая нарушителю получить несанкционированный доступ к защищаемой информации