The Mozilla Foundation has patched the two "extremely critical" security holes in Firefox that appeared last weekend. A new Firefox 1.0.4 release has been posted to the Mozilla.org website.

When used in tandem, the two bugs could be used by an attacker to take control of the Firefox user's system, by exploiting the way Firefox handles software installations from certain trusted Web sites.

Firefox automatically allows software to be installed from update.mozilla.org and addons.mozilla.org, but users who want to add software from other websites can add to this trusted list.

Earlier this week, The Mozilla Foundation made changes to Mozilla.org, which protected most users. But Web surfers who had added other websites to their trusted list were still vulnerable, said Chris Hofmann director of engineering with The Mozilla Foundation.

Danish security firm Secunia has rated the exploit as "extremely critical," marking the first time a flaw in the open-source browser had received its most serious security rating.

Firefox has gained market share against Microsoft's Internet Explorer over the past year, in part because it has been considered less vulnerable to attacks. Since the Firefox 1.0 release last November, however, a number of vulnerabilities have been discovered in the browser.

The Mozilla Foundation reports nearly 54 million Firefox downloads since the 1.0 release. Firefox has 6.8 percent of the browser market, according to WebSideStory. But Internet Explorer is still used by nearly 89 percent of surfers.

The 1.0.4 update also fixes two other minor security bugs as well as the way Firefox handles DHTML, said Hofmann. The DHTML bug caused "uncaught exception" errors to pop up on some Web pages in the 1.0.3 version of the browser.