Craft CMS PHP Code Injection Vulnerability in craftcms/cms
Summary
CVE-2018-3814: Craft CMS PHP Code Injection Vulnerability. Affects craftcms/cms versions < 2.6.3000. 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
Craft CMS is a popular content management system used for building websites and web applications. The craftcms/cms package is a core component of Craft CMS, responsible for managing assets and file uploads. Craft CMS allows users to upload files, including images, through the Assets module. This vulnerability specifically affects Craft CMS version 2.6.3000.
Vulnerability Detail
Craft CMS 2.6.3000 is vulnerable to a PHP code injection attack. Attackers can exploit this vulnerability by using the "Assets->Upload files" screen and selecting the "Replace it" option. This allows them to upload a .jpg file that contains embedded PHP code. The uploaded file can then be renamed to have a .php extension, allowing the execution of arbitrary PHP code on the server. This can lead to unauthorized access, data manipulation, and potential compromise of the entire system.
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 the ability to replace files in the "Assets->Upload files" screen. This can be achieved by modifying the application code or configuration to remove or restrict the "Replace it" option. However, this workaround may limit the functionality of the application and is not a permanent solution.
Conclusion
Craft CMS version 2.6.3000 is vulnerable to a PHP code injection vulnerability that allows attackers to execute arbitrary PHP code on the server. To mitigate this risk, it is crucial to update to a patched version of Craft CMS and ensure proper validation and sanitization of user-uploaded files. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for craftcms/cms →
FAQ
Craft CMS is a content management system used for building websites and web applications. It provides a flexible and customizable platform for managing content and assets.
The vulnerability occurs due to a lack of proper validation and sanitization of user-uploaded files in the "Assets->Upload files" screen. This allows attackers to upload files with malicious PHP code, which can then be executed on the server.
Exploiting this vulnerability can lead to unauthorized access to the server, data manipulation, and potential compromise of the entire system. Attackers can execute arbitrary PHP code, potentially gaining control over the application and its underlying infrastructure.
Yes, the developers of Craft CMS have released a fix for this vulnerability in later versions. It is recommended to update to the latest version to mitigate the risk.
There have been no publicly reported instances of this vulnerability being exploited. However, it is important to apply the necessary patches and security measures to prevent potential attacks.
Related vulnerabilities
Recent vulnerabilities recorded for craftcms/cms.