Secunia CSI 5.0
Overview
Advisories
Research
Forums
Create Profile
Our Commitment
Database
Search
Advisories by Product
Advisories by Vendor
Terminology
Report Vulnerability
Insecure Library Loading

Secunia Advisory SA39556

phpThumb() "fltr[]" Command Injection Vulnerability
Secunia Advisory SA39556
Get alerted and manage the vulnerability life cycle
Free Trial

Release Date 2010-04-21
Last Update 2011-12-07
   
Popularity 7,396 views
Comments 2 comments

Criticality level Highly criticalHighly critical
Impact System access
Where From remote
Authentication level Available in Customer Area
   
Report reliability Available in Customer Area
Solution Status Vendor Workaround
   
Systems affected Available in Customer Area
Approve distribution Available in Customer Area
   
Software:
phpThumb() 1.x

Secunia CVSS Score Available in Customer Area
CVE Reference(s) CVE-2010-1598 CVSS available in Customer Area
  

Description

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

Input passed via the "fltr[]" parameter to phpThumb.php is not properly sanitised before being used in a command line argument. This can be exploited to inject and execute arbitrary shell commands via specially crafted requests.

Successful exploitation requires that "ImageMagick" is installed.

The vulnerability is confirmed in version 1.7.9. Other versions may also be affected.

NOTE: This vulnerability can be exploited with "high_security_enabled" set to "true" by brute forcing the "high_security_password".


Solution
The vulnerability is fixed in version 1.7.10 beta.

Provided and/or discovered by
Reported as an 0-day.

Changelog
Further details available in Customer Area

Original Advisory
http://phpthumb.sourceforge.net/demo/docs/phpthumb.changelog.txt

Deep Links
Links available in Customer Area


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.




 Products Solutions Customers Partner Resources Company
 
 Corporate
Vulnerability Intelligence Manager (VIM)
Corporate Software Inspector (CSI)
Consumer
Personal Software Inspector (PSI)
Online Software Inspector (OSI)
 Industry
Compliance
Technology
Integration
 Customers
Testimonials
 VARS
MSSP
Technology Partners
References
 Factsheets
Reports & Papers
Webinars
Events
 About us
Careers
Memberships
Newsroom


 
© 2002-2012 Secunia ApS - Rued Langgaards Vej 8, 4th floor, DK-2300 Copenhagen, Denmark - +45 7020 5144
Terms & Conditions and Copyright - Privacy - Report Vulnerability