A bug discovered last week in Firefox 3.5’s Just-in-time (JIT) JavaScript compiler was disclosed publicly yesterday. It is a critical vulnerability that can be used to execute malicious code.
Impact
The vulnerability can be exploited by an attacker who tricks a victim into viewing a malicious Web page containing the exploit code. The vulnerability can be mitigated by disabling the JIT in the JavaScript engine. To do so:
1. Enter about:config in the browser’s location bar. 2. Type jit in the Filter box at the top of the config editor. 3. Double-click the line containing javascript.options.jit.content setting the value to false.
Note that disabling the JIT will result in decreased JavaScript performance and is only recommended as a temporary security measure. Once users have been received the security update containing the fix for this issue, they should restore the JIT setting to true by:
1. Enter about:config in the browser’s location bar. 2. Type jit in the Filter box at the top of the config editor. 3. Double-click the line containing javascript.options.jit.content setting the value to true.
There is an add-on called "No Script" that does not allow Javascript to be executed from websites without the user's permission. That is what I've used ever since I've used Firefox.