Arbitrary file upload in Craft CMS - CVE-2018-3814

 

Arbitrary file upload in Craft CMS - CVE-2018-3814

Published: January 1, 2018 / Updated: January 2, 2018


Vulnerability identifier: #VU9828
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2018-3814
CWE-ID: CWE-434
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Pixel & Tonic, Inc.
Affected software:
Craft CMS

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary PHP code on the target system.

The vulnerability exists due to insufficient validation of user-supplied data when uploading files via "Assets->Upload files" screen. A remote authenticated attacker can upload .jpg file with PHP code inside, then use the "Replace it" option to rename the file and add .php extension to it. As a result the uploaded PHP code will be executed on the server.



How to mitigate CVE-2018-3814

Install update from vendor's repository.

Sources