Software security company Synopsys have discovered a new remote code execution vulnerability (RCE) in the Pluck CMS system. Pluck is a content management system (CMS) implemented in PHP designed for setting up and managing your own website. Devised with ease of use and simplicity in mind, Pluck is best suited for running a small website.
Pluck CMS features an “albums” module. Albums are used to create collections of images that can be inserted into web pages across the site. Albums allow the user to upload JPEG, PNG, and GIF filetypes, which undergo a normalization process before being available on the site.
However, not is all as it seems within the system. As a result of a lack of file extension validation, it is possible to upload a crafted JPEG payload containing an embedded PHP web-shell.
Doing this leaves Pluck users – and the ecosystems they use the CMS to develop – vulnerable to attacks. A threat actor may choose to navigate to it directly to achieve RCE on the underlying web server. Administrator credentials for the Pluck CMS web interface are required to access the albums module feature, and are thus required to exploit this vulnerability. However, once these are acquired (which is entirely within a capable threat actor’s capabilities) they will have direct access.
After authenticating through the web interface, a threat actor would need to navigate to the albums module and create a sample album: Images uploaded to an album are subject to normalization via functions from the graphics library PHP-GD, preventing simple web-shell embedding techniques. However, it is possible to embed a web-shell into a JPEG image that will survive this normalization using the tool Jellypeg, create such a payload and upload it with an executable file extension (.php, .phar, etc.). Navigating to the uploaded file directly allows RCE.