File Browser's Uncontrolled Memory Consumption vulnerability can enable DoS attack due to oversized file processing
Date: 2025-07
Affected: go/github.com/filebrowser/filebrowser/v2
Attack vector: dos
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2025-53893
CWE: CWE-400
CWE-789

### Summary A Denial of Service (DoS) vulnerability exists in the file processing logic when reading a file on endpoint `Filebrowser-Server-IP:PORT/files/{file-name}` . While the server correctly handles and stores uploaded files, it attempts to load the entire content into memory during read operations without size checks or resource limits. This allows an authenticated user to upload a large file and trigger uncontrolled memory consumption on read, potentially crashing the server and making it unresponsive. ### Details The endpoint ` /api/resources/{file-name}` accepts `PUT` requests with plain text file content. Uploading an extremely large file (e.g., ~1.5 GB) succeeds without issue. However, when the server attempts to open and read this file, it performs the read operation in an unbounded or inefficient way, leading to excessive memory usage. This approach attempts to read the entire file into memory at once. For large files, this causes memory exhaustion resulting in a crash or serious performance degradation. In the filebrowser codebase, this can be due to: - Lack of memory-safe streaming or chunked reading during file processing. - Absence of validation or size limits during the read phase. - Possibly synchronous or blocking file parsing without protection. ### PoC 0. I run the project via docker (latest version, 2.38.0) using the following command found in the documentation: ``` docker run \ -v filebrowser_data:/srv \ -v filebrowser_database:/database


Mitigations:

Architectural layers (MAESTRO):