WordPress Image Gallery with Slideshow Plugin SQL Injection and Arbitrary File Upload


Description   A security issue and a vulnerability have been discovered in the Image Gallery with Slideshow plugin for WordPress, which can be exploited by malicious people to conduct SQL injection attacks and compromise a vulnerable system.
1) Input passed via the filename when uploading a file through a webform is not properly sanitised in wp-content/plugins/image-gallery-with-slideshow/upload-file.php before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
Successful exploitation of this vulnerability requires that "magic_quotes_gpc" is disabled.
2) The security issue is caused due to missing access restrictions to the wp-content/plugins/image-gallery-with-slideshow/upload-file.php script. This can be exploited to upload arbitrary files to the "wp-content/plugins/image-gallery-with-slideshow/uploads/original" folder inside the webroot and e.g. execute arbitrary PHP code.
The vulnerabilities are confirmed in version 1.5. Other versions may also be affected.
     
Vulnerable Products   Vulnerable Software:
WordPress Image Gallery with Slideshow Plugin 1.x
     
Solution   Update to version 1.5.2.
     
CVE  
     
References   Image Gallery with Slideshow Changelog:
http://wordpress.org/extend/plugins/image-gallery-with-slideshow/changelog/
     
Vulnerability Manager Detection   No
     
IPS Protection  
ASQ Engine alarm Available Since
SQL injection Prevention - GET : suspicious OR statement in URL
3.2.0
SQL injection Prevention - GET : suspicious combination of 'OR' or 'AND' statements in URL
3.2.0
SQL injection Prevention - GET : suspicious CREATE statement in URL
3.2.0
SQL injection Prevention - GET : suspicious CAST statement in URL
3.2.0
SQL injection Prevention - GET : suspicious OPENROWSET statement in URL
3.2.0
SQL injection Prevention - GET : suspicious DECLARE statement in URL
3.2.0
SQL injection Prevention - GET : suspicious OPENQUERY statement in URL
3.2.0
SQL injection Prevention - GET : suspicious shutdown statement in URL
3.2.0
SQL injection Prevention - GET : suspicious UNION SELECT statement in URL
3.2.0
SQL injection Prevention - GET : possible database version probing
3.2.0
SQL injection Prevention - GET : suspicious UPDATE SET statement in URL
3.2.0
SQL injection Prevention - GET : suspicious SELECT statement in URL
3.2.0
SQL injection Prevention - GET : suspicious INSERT statement in URL
3.2.0
SQL injection Prevention - GET : suspicious DROP statement in URL
3.2.0
SQL injection Prevention - GET : suspicious EXEC statement in URL
3.2.0
SQL injection Prevention - GET : block comment delimiters in URL
3.2.0
SQL injection Prevention - GET : suspicious SQL statement in header
4.0.0
     


 
 
 
 
 Risk level 
High 

 Vulnerability First Public Report Date 
2011-09-01 

 Target Type 
Server 

 Possible exploit 
Remote