Mozilla on Tuesday patched 12 security vulnerabilities in Firefox 3, just days before it hopes to roll out the newest beta of its next open-source browser, Firefox 3.5.

Of the dozen flaws fixed in Firefox 3.0.9, four were rated "critical," two "high," two "moderate" and four "low" in Mozilla's four-step ranking system. It was the most vulnerabilities Mozilla has patched since December 2008, when it quashed 13 bugs.

The four critical vulnerabilities -- two in the Firefox browser engine, two in its JavaScript engine -- were patched by a single multi-fix update that Mozilla, as is its practice, said might be exploitable. "Some of these crashes showed evidence of memory corruption under certain circumstances and we presume that with enough effort at least some of these could be exploited to run arbitrary code," the boilerplate text said in the accompanying security advisory.

Other patches prevent rogue search plug-ins from sending users to malicious Web sites and block attackers from using Adobe Flash to conduct cross-site forgery request attacks or secretly plant cookie-like objects on a machine to track the user's movements on the Web.

Mozilla addressed several non-security bugs in the update as well, including a database corruption problem that deleted cookies and an issue with displaying inline images on some Web-based services, including AOL's e-mail and instant messaging services.

Tuesday's update, the third this year, follows by four weeks an emergency patch Mozilla hustled out to fix a bug that had earned a German college student $5,000 in the Pwn2Own hacking contest.

Firefox 3.0.9 may not be the only update Mozilla unveils this week; the company is still planning on releasing Firefox 3.5 Beta 4 by the end of the week, according to posted meeting notes. That schedule may slip, however, as Mozilla developers have yet to declare a "code freeze," a milestone that means all the bugs that will be fixed have been. There are currently seven bugs that must be resolved before the beta can move into internal testing prior to actual release.

In a note from a meeting held earlier today, Mozilla said that a code freeze for Firefox 3.5 Beta 4 was "day-by-day." Beta 4 has already slipped from an earlier schedule that said it would ship by April 14.

Firefox 3.5, formerly known as 3.1, was conceived as a "fast track" upgrade last year, and was originally intended to launch in late 2008. But the browser's progress has been repeatedly delayed, either to add new features, as was done last fall, or to deal with troublesome bugs. As a result, Mozilla has had to rework 3.5's schedule several times. Beta 3, the most recent update to Firefox 3.5, shipped March 12.

Firefox 3.0.9 can be downloaded for Windows, Mac OS X and Linux from the Mozilla site. Current users can also call up their browser's built-in updater, or wait for the automatic update notification, which should pop up in the next 48 hours.