A security vulnerability has been identified in Bludit, allowing attackers with knowledge of the API token to upload arbitrary files through the File API which leads to arbitrary code execution on the server. This vulnerability arises from improper handling of file uploads, enabling malicious actors to upload and execute PHP files.
Advisories
Source ID Title
EUVD EUVD EUVD-2024-21968 A security vulnerability has been identified in Bludit, allowing attackers with knowledge of the API token to upload arbitrary files through the File API which leads to arbitrary code execution on the server. This vulnerability arises from improper handling of file uploads, enabling malicious actors to upload and execute PHP files.
Fixes

Solution

1. Remove file upload API: As the API POST request for uploading files is not documented, it can be assumed that it is a feature not actually needed by Bludit users. This is substantiated by the fact that users also cannot upload arbitrary files with the web application (AJAX). 2. Use an allowlist: If the first suggestion is not feasible as it is an actively used feature of Bludit users, it is advised to restrict the possible upload file formats with an allowlist. Before storing the uploaded files in the intended directory, their file extension and mime type should be checked. 3. Restrict upload storage: Users should only be allowed to store a certain amount of data on the file share (e.g. 10MB). 4. If uploaded files should not be downloadable by everyone: Ensure that the temporary file directory is relocated outside of the web root to prevent unauthorized access. 5. If uploaded files should be downloadable: Disable PHP in upload folder, e.g. with the following configuration in nginx: ``` location /upload_folder {     # Disable PHP execution     location ~ \.php$ {         deny all;     }     # Allow other file types     location /upload_folder/ {         # Additional configurations for other file types if necessary     } } ```


Workaround

No workaround given by the vendor.

History

No history.

cve-icon MITRE

Status: PUBLISHED

Assigner: NCSC.ch

Published:

Updated: 2024-08-01T23:19:52.559Z

Reserved: 2024-01-25T14:02:00.526Z

Link: CVE-2024-24550

cve-icon Vulnrichment

Updated: 2024-06-24T13:33:32.615Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2024-06-24T07:15:13.580

Modified: 2024-11-21T08:59:23.793

Link: CVE-2024-24550

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.