Summary
File Browser contains an authorization flaw in the direct-upload cleanup path that can recursively delete an existing directory when an upload operation fails. An authenticated user with Create and Modify permissions may exploit this behavior to remove directories and files outside their permitted deletion rules, although filesystem scope restrictions still limit the affected area.
Affected context
The issue affects File Browser deployments within the stated vulnerable version range when the direct-upload endpoint processes a request targeting an existing directory with overwrite behavior enabled. The risk is greatest when authenticated users have Create and Modify permissions but are not intended to have directory deletion authority, because the failure-cleanup path does not apply the same permission and descendant-rule checks used by other file-management handlers.
Exploit preconditions
- Attack surface: Authenticated HTTP access to the direct-upload endpoint
- Required access: A non-administrator account with the default Create and Modify permissions
- Trigger point: A direct upload targeting an existing directory with overwrite behavior enabled
- Why exploitation is possible: The failed write invokes recursive cleanup without checking Delete permission or descendant authorization rules
- Scope limitation: The filesystem scope guard remains enforced, limiting deletion to paths within the user's assigned scope
Why this happens
The vulnerability results from inconsistent authorization enforcement between related file-management operations. When direct upload attempts to write to a directory and the write fails, its cleanup logic invokes a recursive removal operation without applying the Delete permission check and descendant validation used by the delete and patch handlers. This maps to CWE-863: Incorrect Authorization, because a sensitive filesystem action is performed without consistently verifying whether the requesting principal is authorized to perform it.
Potential impact
- An authenticated user may delete directories they are not authorized to remove
- Files inside affected directories may be recursively deleted
- Rule-denied descendants may be removed despite configured restrictions
- Application data availability and integrity could be impacted
- A user could cause broader disruption within their permitted filesystem scope
General mitigation guidance
Mitigation generally focuses on making authorization checks consistent across all filesystem operations and ensuring cleanup routines cannot bypass policy enforcement.
Common defensive patterns include:
- Applying Delete permission checks before every recursive removal operation
- Reusing centralized descendant and rule-walk authorization logic
- Treating cleanup actions as security-sensitive operations rather than implementation details
- Rejecting directory targets early when the operation is intended for file upload
- Reducing filesystem scopes and assigning only the permissions required for each user
- Using separate service identities and restrictive storage permissions where practical
- Auditing and alerting on recursive deletion attempts and unusual cleanup failures
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis that identifies filesystem deletion calls reachable from upload or error-handling paths
- Code review checks verifying authorization before recursive removal operations
- Tests that exercise uploads targeting files, directories, rule-denied descendants, and failed writes
- Policy checks requiring shared authorization functions for delete, patch, upload, and cleanup handlers
- Runtime monitoring for recursive deletion events initiated by accounts lacking Delete permission
- Automated security review tools that flag inconsistent permission checks across equivalent endpoints

