CVE-2023-7036: Unrestricted File Upload in automad
Summary
CVE-2023-7036: Withdrawn Advisory: Unrestricted File Upload affecting automad. Affects automad/automad versions < 1.10.9. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
automad is a package available on Packagist that provides a content management system (CMS) for creating and managing websites. It offers various features such as template-based content creation, dynamic page generation, and file management. The vulnerability in automad allows for unrestricted file uploads, potentially leading to unauthorized access and execution of malicious code.
Vulnerability Detail
The vulnerability exists in the 'upload' function of the 'FileCollectionController.php' file within the 'Content Type Handler' component of automad. This function does not properly validate uploaded files, allowing an attacker to upload arbitrary files to the server. This can lead to various attacks, including remote code execution, file tampering, and unauthorized access to sensitive data. The vulnerability has been publicly disclosed, increasing the risk of exploitation.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can disable file uploads or implement additional server-side validation to ensure that only allowed file types are uploaded. This can be done by modifying the configuration or code of the application. Here is an example of server-side validation in PHP:
$allowedExtensions = ['jpg', 'png', 'gif'];
$uploadedFile = $_FILES['file'];
$extension = pathinfo($uploadedFile['name'], PATHINFO_EXTENSION);
if (!in_array($extension, $allowedExtensions)) {
// Handle invalid file type
exit;
}
// Process the uploaded file
Conclusion
The unrestricted file upload vulnerability in automad can have severe consequences, including remote code execution and unauthorized access to sensitive data. It is crucial to update to the latest version of automad (1.10.10 or later) to mitigate this vulnerability. Additionally, implementing proper server-side validation or temporarily disabling file uploads can provide some protection. For further assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for automad/automad →
FAQ
The vulnerability allows an attacker to upload arbitrary files to the server, potentially leading to remote code execution, unauthorized access to sensitive data, and tampering with existing files.
Yes, this vulnerability can be exploited remotely as the attack can be launched over the network.
Yes, an exploit for this vulnerability has been publicly disclosed.
Yes, the vendor has released a patch in version 1.10.10 of automad.
Yes, users can temporarily disable file uploads or implement additional server-side validation to restrict allowed file types.
Related vulnerabilities
Recent vulnerabilities recorded for automad/automad.