Apple just released Java for OS X 2012-003, an update to the Java implementation in OS X. You can obtain it via the Software Updates component of the Mac OS X Systems Preferences app.
This Java security update removes the most common variants of the Flashback malware. This update also configures the Java web plug-in to disable the automatic execution of Java applets. Users may re-enable automatic execution of Java applets using the Java Preferences application. If the Java web plug-in detects that no applets have been run for an extended period of time it will again disable Java applets.
Java for OS X Lion 2012-003 delivers Java SE 6 version 1.6.0_31 and supersedes all previous versions of Java for OS X Lion. Apple says the update is recommended for all Mac users with Java installed.