Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

Coppermine Photo Gallery picEditor.php Command Execution

Disclosed
Jan 30, 2008
Created
May 30, 2018

Description

This module exploits a vulnerability in the picEditor.php script of
Coppermine Photo Gallery versions 1.4.14 and earlier. When configured to
use the ImageMagick library, the 'quality', 'angle', and 'clipval'
parameters are not properly escaped before being passed to the PHP
'exec' command.

In order to reach the vulnerable 'exec' call, the input must pass
several validation steps.

The vulnerabilities actually reside in the following functions:

image_processor.php: rotate_image(...)
include/imageObjectIM.class.php: imageObject::cropImage(...)
include/imageObjectIM.class.php: imageObject::rotateImage(...)
include/imageObjectIM.class.php: imageObject::resizeImage(...)
include/picmgmt.inc.php: resize_image(...)

NOTE: Use of the ImageMagick library is a non-default option. However, a
user can specify its use at installation time.

Authors

Janek Vind
jduck [email protected]

Platform

Unix

Architectures

cmd

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/unix/webapp/coppermine_piceditor
msf exploit(coppermine_piceditor) > show targets
...targets...
msf exploit(coppermine_piceditor) > set TARGET < target-id >
msf exploit(coppermine_piceditor) > show options
...show and set options...
msf exploit(coppermine_piceditor) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.