Sun has disclosed a serious vulnerability in the Java Plug-in technology within the Software Developers’ Kit (SDK) and the Java Run-time Environment (JRE) that allows attackers to bypass the Java sandbox and Java applet security.

The specific problem exists within the access controls of the Java-to-Javascript data exchange in web browsers that use Plug-in technology, and lets Javascript load an unsafe class - something usually impossible. As a result, a remote attacker could execute hostile applets to access, download, upload or execute arbitrary files, as well as access the Java Virtual Machine user’s network.

"If someone has found interaction between the Javascript running within the HTML on your webpage and a Java applets, it’s very serious, as the script can now command the applet to do something it shouldn’t," commented Bruno Beloff, technical director at ASP Class Calendar. Most seriously, he went on, "I see no mechanism whereby someone using Plug-ins can be notified to collect a fix."

The episode is potentially damaging for Sun. Its CEO Scott McNealy has repeatedly emphasised the secure nature of Java in comparison to Microsoft's alternatives. "When was the last time you heard of a Java virus?” he asked an audience in Berlin at the end of last year.

Beloff said McNealy’s claims for Java were "reasonable, because it was designed to be more secure, and it’s a good design." He added that the idea of the sandbox, put forward by Sun in the mid-90s to enable applets to run within protected environments, was "very good from the security point of view" and one which, at the time, had distinguished Java applets from rival technologies such as Microsoft’s COM components.

In disclosing the vulnerability, Sun says there is no workaround, and recommends that users of SDK and its JRE subset move to versions 1.4.2_06 and later or 1.3.1_13 and later - both of which are available from

Security intelligence company iDefense, on the other hand, says "disabling Java or JavaScript will prevent exploitation as the vulnerability relies on the data transfer between the two components." Worse still, it goes on to point out that "other Java Virtual Machines, such as the Microsoft VM, are available and can be used as an alternative". This is not a complete solution either though since Microsoft is ending support for its VM in three years' time, on 31 December 2007.

Update: Late on 24 November, Sun gave this statement regarding the hole: "Sun is aware that a possible security vulnerability in the Java Virtual Machine was found by Secunia, and has been collaborating with them on quickly addressing the issue. Although there have been no reported cases of this potential vulnerability being exploited by hackers, Sun takes this issue seriously, as it does all security issues.

"Sun began distributing the upgrade that addressed the vulnerability in early October to its customers, and this week posted the security alert and the updated version of the Java Runtime Environment that eradicates a possible vulnerability to the general public. Sun will not speculate on the vulnerability or scenarios under which it could possibly be exploited. The upgrade is available at the website."