Only the file extensions are checked, not the MIME types as configured
The file access control feature only checks file extensions, not the configured MIME types, so a user can rename a blocked file to an allowed extension and upload it. An attacker could thus upload malicious files that the administrator intended to block.
- Triaged in 32 days
- Fixed in 3 months
- Paid in 5 months
- Disclosed after 6 months
The tool is not working as hoped. File access control speaks of MIME types that are blocked or not blocked. In fact, only the file extensions are checked. If a user renames an unauthorized file to an allowed file, he can upload and download it. The MIME type of the current file is insignificant, only the file extension is checked.
A company administrator prohibits the upload of exe files using file access control and MIME types. One user copies his remote access application as a txt file to Nextcloud and downloads it in his professional environment.
A user on github has created a patch that has not yet found its way into the public repository.
Impact
An attacker could upload malicious files that have been blocked by the administrator.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the file access control implementation checks only the file extension and ignores the configured MIME type restrictions.
Impact
An attacker could upload malicious files that have been blocked by the administrator.
What the attacker needed
File access control configured with MIME types; ability to upload files
The fix
A user on GitHub created a patch that has not yet reached the public repository.
How it was found
- An administrator configures file access control to block exe files using MIME types.
- A user copies a remote access application and renames it with a txt extension.
- The user uploads the renamed file to Nextcloud.
- The user downloads the file in their professional environment.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A security feature meant to stop certain file types from being uploaded only looks at the name ending (like .exe) instead of the actual file content type. By renaming a dangerous file to a harmless ending (like .txt), a user can bypass the block. This means an attacker could upload malicious software that the administrator tried to forbid.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.