Mozilla Firefox JavaScript Prompt Spoofing Weakness

2009-12-09T00:00:00
ID SECURITYVULNS:DOC:22877
Type securityvulns
Reporter Securityvulns
Modified 2009-12-09T00:00:00

Description

There exist two seperate security issues in Mozilla Firefox concerning JavaScript prompts appearing from domain which is not the true origin. The first is about spawning JavaScript prompted message over web page of another domain, so in effect, the address bar and the browser content are from one domain, but the prompted JavaScript message is generated by script from another different domain. This is resulted from a race condition scenario, in which the browser is first navigated to URL of another domain, then before it's loaded, immediately launch JavaScript message prompting, so JavaScript message is displayed over a web page other than its origin web page. The issue here only affects Firefox, and doesn't seem to affect Internet Explorer and Google Chrome. This is CVE-2009-4129. The second is regarding the function named "MakeScriptDialogTitle"(in file "nsGlobalWindow.cpp" of Firefox source code), responsible for "Script Dialog Title", which is designed to show "host". The "MakeScriptDialogTitle" function removes usernames and passwords from URL, with a purpose of "spoof prevention", but it's not enough, because script dialog has limited and predictable width, so only the prefix will be displayed if domain name is long. This is CVE-2009-4130. Topsec has the credit.