File Browser TUS Negative Upload-Length Fires Post-Upload Hooks Prematurely
File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. In versions 2.61.2 and below, the TUS resumable upload handler parses the Upload-Length header as a signed 64-bit integer without validating that the value is non-negative, allowing an authenticated user to supply a negative value that instantly satisfies the upload completion condition upon the first PATCH request. This causes the server to fire after_upload exec hooks with empty or partial files, enabling an attacker to repeatedly trigger any configured hook with arbitrary filenames and zero bytes written. The impact ranges from DoS through expensive processing hooks, to command injection amplification when combined with malicious filenames, to abuse of upload-driven workflows like S3 ingestion or database inserts. Even without exec hooks enabled, the negative Upload-Length creates inconsistent cache entries where files are marked complete but contain no data. All deployments using the TUS upload endpoint (/api/tus) are affected, with the enableExec flag escalating the impact from cache inconsistency to remote command execution. At the time of publication, no patch or mitigation was available to address this issue.
References
- https://github.com/filebrowser/filebrowser/security/advisories/GHSA-ffx7-75gc-jg7c x_refsource_CONFIRM
- https://github.com/filebrowser/filebrowser/issues/5199 x_refsource_MISC
Affected products
- ==<= 2.61.2
Matching in nixpkgs
pkgs.filebrowser
Filebrowser is a web application for managing files and directories
pkgs.filebrowser-quantum
Access and manage your files from the web
-
nixos-unstable 1.1.0-stable
- nixpkgs-unstable 1.1.0-stable
- nixos-unstable-small 1.2.2-stable
pkgs.python312Packages.filebrowser-safe
Snapshot of django-filebrowser for the Mezzanine CMS
pkgs.python313Packages.filebrowser-safe
Snapshot of django-filebrowser for the Mezzanine CMS
pkgs.python314Packages.filebrowser-safe
Snapshot of django-filebrowser for the Mezzanine CMS
Package maintainers
-
@HritwikSinghal Hritwik Singhal <nix@thorin.theoakenshield.com>
-
@prikhi Pavan Rikhi <pavan.rikhi@gmail.com>
-
@JocimSus Joachim Susatiyo <joe.susatiyo@gmail.com>