Gaping Holes Found in IE, Firefox

By Lisa Vaas  |  Posted 2007-06-05 Print this article Print

JavaScript has once again reared its buggy head, as a security researcher finds major critical JS holes in both Internet Explorer and Firefox.

The researcher, Michal Zalewski, on June 4 reported a JavaScript flaw in fully patched IE 6 and 7 that can allow an attacker to fiddle with a documents Document Object Model—a model for representing HTML or XML and related formats.

The result can be cookie stealing or cookie resetting, browser crash, page hijacking, code injection or memory corruption.
The vulnerability occurs when JavaScript code instructs the IE application to navigate away from a page that meets same-domain origin policy, Zalewski said.
This makes it possible for an attacker to access and modify the command, directing the browser to an unrelated third-party site. During the redirect, the attacker has a window of time in which to execute JavaScript that has permissions pertaining to the first page visited, not the third-party page to which the browser has been redirected. The previous permissions pertain to content for the newly loaded page, which can be malicious, such as:
  • Read or set victim.document.cookie
  • Arbitrarily alter document DOM, including changing form submission URLs, injecting code
  • Read or write DOM structures that were not fully initialized, prompting memory corruption and browser crash.
Zalewski has posted a demo here. Zalewski found another bug, this one of medium impact, having to do with an IE 6 file prompt delay bypass that could lead to a forced download or execution of files—URL bar spoofing. IE 7 isnt affected, he said, due to high-level browser changes. Hes posted a demo here. Microsoft is investigating the two possible vulnerabilities. A spokesperson said that at this point, the company isnt aware of any attacks that have tried to exploit the flaws. The Firefox flaw Zalewski uncovered also boils down to a JavaScript error. This flaw allows an attacker to inject malicious code, including key-snooping event handlers, on pages that rely on IFrames (inline frames) to display contents or store state data—in other words, the unique configuration of information in a program or machine—or to communicate with a server. An IFrame is an HTML element through which one HTML document can be embedded within a main document. This problem, which Zalewski tags as being a major flaw, can lead to interception of keystrokes and content spoofing, among other things. Mozilla said that the flaw allows attackers to display "offensive, misleading or dangerous contents on trusted sites" or to spoof login prompts. An attacker can also track user behavior, such as timing when a victim arrived and departed at a site, because of the presence of IFrames. JavaScript attacks keep getting slicker. Click here to read more. Mozilla also said that this flaw is a duplicate of a previously reported flaw, Bug 381300. Zalewski responded on Mozillas bug site by agreeing that the underlying bugs are "very much the same," but that the attack scenario differs from his findings in two ways. "The initial report considered only a more benign opportunity (page element spoofing vs. snooping on user input), and did not account for the possibility that persistent about:blank frames that do not require a race condition to occur (which is important when considering a proper fix; but that point is moot if you plan to backport a more comprehensive fix from trunk)." Zalewski has a demo of the Firefox bug here. Check out eWEEK.coms Security Center for the latest security news, reviews and analysis. And for insights on security coverage around the Web, take a look at eWEEKs Security Watch blog.
Lisa Vaas is News Editor/Operations for and also serves as editor of the Database topic center. Since 1995, she has also been a Webcast news show anchorperson and a reporter covering the IT industry. She has focused on customer relationship management technology, IT salaries and careers, effects of the H1-B visa on the technology workforce, wireless technology, security, and, most recently, databases and the technologies that touch upon them. Her articles have appeared in eWEEK's print edition, on, and in the startup IT magazine PC Connection. Prior to becoming a journalist, Vaas experienced an array of eye-opening careers, including driving a cab in Boston, photographing cranky babies in shopping malls, selling cameras, typography and computer training. She stopped a hair short of finishing an M.A. in English at the University of Massachusetts in Boston. She earned a B.S. in Communications from Emerson College. She runs two open-mic reading series in Boston and currently keeps bees in her home in Mashpee, Mass.

Submit a Comment

Loading Comments...
Manage your Newsletters: Login   Register My Newsletters

Rocket Fuel