ghsa-jj2r-455p-5gvf
Vulnerability from github
Summary
The file access permissions for files uploaded to or created from File Browser are never explicitly set by the application. The same is true for the database used by File Browser. On standard servers where the umask configuration has not been hardened before, this makes all the stated files readable by any operating system account.
Impact
The default permissions for new files on a standard Linux system are 0644
, making them world-readable.
That means that at least the following parties have full read access to all files managed by the Filebrowser from all scopes, as well as its database (including the password hashes stored in there):
- All OS accounts on the server
- All other applications running on the same server
- Any Filebrowser user with Command Execution privileges having access to a command that allows reading a file's content
Vulnerability Description
On a Linux system, the file access permissions of new files are designated by the system wide umask setting, unless they are configured manually.
Most distributions set this value to 022
by default which gives every account on the system read permissions on the file.
bash
$ umask
022
$ touch foo
$ ls -l foo
-rw-r--r-- 1 sba sba 0 31. Mär 15:08 foo
Proof of Concept
Upload or create a file in the Filebrowser GUI and list the directory contents from a shell:
bash
$ ls -l /srv/filebrowser/testdir
total 12
-rw-r--r-- 1 sba sba 7703 Mar 25 16:07 dummy1.pdf
-rw-r--r-- 1 sba sba 3 Mar 25 15:46 testfile.txt
The same can be validated for Docker based deployments within the container:
bash
$ docker exec -it e0f075082a2c ls /srv/testdir -l
total 12
-rw-r--r-- 1 1000 1000 7703 Mar 25 15:07 dummy1.pdf
-rw-r--r-- 1 1000 1000 3 Mar 25 14:46 testfile.txt
Furthermore, the database used by the Filebrowser application is readable by any account:
bash
$ ls -l /srv/filebrowser/filebrowser.db
-rw-rw-r-- 1 sba sba 65536 Mar 25 09:58 /srv/filebrowser/filebrowser.db
Recommended Countermeasures
Since the system's umask configuration cannot be controlled by the Filebrowser, the application needs to set the permissions of all new files manually upon creation. No permissions should be given to the other category.
Implementing this won't fix the permissions for active instances after an update, so site administrators will need to fix the permissions manually:
bash
$ chmod o-rwx -R /srv/filebrowser/datadir
Timeline
2025-03-25
Identified the vulnerability in version 2.32.02025-04-11
Contacted the project2025-04-18
Vulnerability disclosed to the project2025-06-25
Uploaded advisories to the project's GitHub repository2025-06-26
CVE ID assigned by GitHub2025-06-26
Fix released with version 2.33.7
References
Credits
- Mathias Tausig (SBA Research)
{ "affected": [ { "package": { "ecosystem": "Go", "name": "github.com/filebrowser/filebrowser/v2" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "2.33.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Go", "name": "github.com/filebrowser/filebrowser" }, "ranges": [ { "events": [ { "introduced": "0" }, { "last_affected": "1.11.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-52900" ], "database_specific": { "cwe_ids": [ "CWE-276" ], "github_reviewed": true, "github_reviewed_at": "2025-06-27T14:55:07Z", "nvd_published_at": "2025-06-26T15:15:23Z", "severity": "MODERATE" }, "details": "## Summary ##\n\nThe file access permissions for files uploaded to or created from File Browser are never explicitly set by the application.\nThe same is true for the database used by File Browser. On standard servers where the *umask* configuration has not been hardened before, this makes all the stated files readable by any operating system account.\n\n## Impact ##\n\nThe default permissions for new files on a standard Linux system are `0644`, making them world-readable.\nThat means that at least the following parties have full read access to all files managed by the Filebrowser from all *scopes*, as well as its database (including the password hashes stored in there):\n\n* All OS accounts on the server\n* All other applications running on the same server\n* Any Filebrowser user with *Command Execution* privileges having access to a command that allows reading a file\u0027s content\n\n## Vulnerability Description ##\n\nOn a Linux system, the file access permissions of new files are designated by the system wide *umask* setting, unless they are configured manually.\nMost distributions set this value to `022` by default which gives every account on the system read permissions on the file.\n\n```bash\n$ umask\n022\n$ touch foo\n$ ls -l foo\n-rw-r--r-- 1 sba sba 0 31. M\u00e4r 15:08 foo\n```\n\n## Proof of Concept ##\n\nUpload or create a file in the Filebrowser GUI and list the directory contents from a shell:\n\n```bash\n$ ls -l /srv/filebrowser/testdir\ntotal 12\n-rw-r--r-- 1 sba sba 7703 Mar 25 16:07 dummy1.pdf\n-rw-r--r-- 1 sba sba 3 Mar 25 15:46 testfile.txt\n```\n\nThe same can be validated for Docker based deployments within the container:\n\n```bash\n$ docker exec -it e0f075082a2c ls /srv/testdir -l\ntotal 12\n-rw-r--r-- 1 1000 1000 7703 Mar 25 15:07 dummy1.pdf\n-rw-r--r-- 1 1000 1000 3 Mar 25 14:46 testfile.txt\n```\n\nFurthermore, the database used by the Filebrowser application is readable by any account:\n\n```bash\n$ ls -l /srv/filebrowser/filebrowser.db \n-rw-rw-r-- 1 sba sba 65536 Mar 25 09:58 /srv/filebrowser/filebrowser.db\n```\n\n## Recommended Countermeasures ##\n\nSince the system\u0027s *umask* configuration cannot be controlled by the Filebrowser, the application needs to set the permissions of all new files manually upon creation.\nNo permissions should be given to the *other* category.\n\nImplementing this won\u0027t fix the permissions for active instances after an update, so site administrators will need to fix the permissions manually:\n\n```bash\n$ chmod o-rwx -R /srv/filebrowser/datadir\n```\n\n## Timeline ##\n\n* `2025-03-25` Identified the vulnerability in version 2.32.0\n* `2025-04-11` Contacted the project\n* `2025-04-18` Vulnerability disclosed to the project\n* `2025-06-25` Uploaded advisories to the project\u0027s GitHub repository\n* `2025-06-26` CVE ID assigned by GitHub\n* `2025-06-26` Fix released with version 2.33.7\n\n## References ##\n\n* [CWE-276: Incorrect Default Permissions](https://cwe.mitre.org/data/definitions/276.html)\n* [What is Umask and How To Setup Default umask Under Linux?](https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html)\n\n## Credits ##\n\n* Mathias Tausig ([SBA Research](https://www.sba-research.org/))", "id": "GHSA-jj2r-455p-5gvf", "modified": "2025-06-27T14:55:07Z", "published": "2025-06-27T14:55:07Z", "references": [ { "type": "WEB", "url": "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-jj2r-455p-5gvf" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-52900" }, { "type": "WEB", "url": "https://github.com/filebrowser/filebrowser/commit/ca86f916216620365c0f81629c0934ce02574d76" }, { "type": "PACKAGE", "url": "https://github.com/filebrowser/filebrowser" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N", "type": "CVSS_V3" } ], "summary": "filebrowser Sets Insecure File Permissions" }
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.