Highly critical

phpThumb() "fltr[]" Command Injection Vulnerability


Release Date:  2010-04-21    Last Update:  2011-12-07    Views:  12,564

Secunia Advisory SA39556


You need to log in to view this


You need to log in to view this

Solution Status:

You need to log in to view this


You need to log in to view this

CVE Reference(s):

You need to log in to view this


A vulnerability has been discovered in phpThumb(), which can be exploited by malicious people to compromise a vulnerable system

You need to log in to the Secunia Community to view the full description of this advisory

If you are not a member of the Secunia community, you can sign up here for free.

Do you have additional information related to this advisory?

Please provide information about patches, mitigating factors, new versions, exploits, faulty patches, links, and other relevant data by posting comments to this Advisory. You can also send this information to vuln@secunia.com

Subject: phpThumb() "fltr[]" Command Injection Vulnerability

User Message
pulsorock RE: phpThumb() "fltr[]" Command Injection Vulnerability
Member 21st Dec, 2010 14:57
Score: 0
Posts: 1
User Since: 21st Dec 2010
System Score: N/A
Location: PR
Last edited on 21st Dec, 2010 15:02
Here you can find a solution:

You can fix this by editing a single file: phpThumb/phpthumb.functions.php (around line 443). You just need to add a couple filtering commands to the SafeExec function to filter its input before it sends it to the command line. Right after the function declaration, add lines that filter the $command input. I haven't tested this against all possible valid phpThumb input arguments, but this does prevent a "contained" hack.

function SafeExec($command) {

// Strip off any commands after the first semi-colon
// and prepare the data to be sent to the command line.
// EVERETT @ www.fireproofsocks.com 9/26/2010
$command = preg_replace('/;.*$/','',$command); // <-- *NIX only
$command = escapeshellcmd($command);

Link: http://modxcms.com/forums/index.php/topic,54874.ms...
Was this reply relevant?
pkmtrkd RE: phpThumb() "fltr[]" Command Injection Vulnerability
Member 23rd Dec, 2011 04:25
Score: 1
Posts: 1
User Since: 23rd Dec 2011
System Score: N/A
Location: US
Last edited on 23rd Dec, 2011 04:25
This is a fairly old thread, but please be aware that there was an uptick just today in the amount of scan activity trying to exploit this vulnerability. If anyone is still running vulnerable versions of phpthumb, you need to upgrade immediately.

Details of the activity seen today are at this link: http://foxtrot7security.blogspot.com/2011/12/new-a...
Was this reply relevant?


You must be logged in to post a comment.