All use of Secunia Advisories is for non-commercial use only. No use is permitted for commercial use. For further information, see the End User License Agreement or contact us. If you are an IT security professional, request a trial of the Secunia VIM.

 
Highly critical

phpThumb() "fltr[]" Command Injection Vulnerability

-

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

Secunia Advisory SA39556

Where:

Log in with your Secunia community profile. If you are an IT security professional, request a trial of the Secunia VIM.

Impact:

Log in with your Secunia community profile. If you are an IT security professional, request a trial of the Secunia VIM.

Solution Status:

Log in with your Secunia community profile. If you are an IT security professional, request a trial of the Secunia VIM.

Software:

Log in with your Secunia community profile. If you are an IT security professional, request a trial of the Secunia VIM.

CVE Reference(s):

Log in with your Secunia community profile. If you are an IT security professional, request a trial of the Secunia VIM.

Description


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


Log in with your Secunia community profile to view the full description of this Advisory. If you are an IT security professional, request a trial of the Secunia VIM.

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?
+0
-0
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?
+1
-0

-

You must be logged in to post a comment.