A security flaw within Java 2 has been identified and a patch is now available from Sun Microsystems, according to the company.
The security hole, which the company stated was a mistake in the creation of the Java 2 code and not in the Java security architecture itself, was discovered by Karsten Sohr, a graduate student at the University of Marburg, in Germany.
The flaw allows an attacker to create a booby-trapped Web page, so that when a victim views the page, the attacker can seize control of the victim's machine, possibly allowing the attacker to read and delete files and access data and applications, according to Gary McGraw and Edward Felten, authors of Java security books. McGraw and Felten, along with Sohr, notified Sun and Netscape of the flaw in mid-March.
"This hole serves to emphasise that security problems are likely to crop up in new releases of complex systems like Java, even when security is a major goal," McGraw said. "Under some circumstances, the component fails to check all of the code that is loaded into the JVM [Java virtual machine]. Exploiting the flaw allows the attacker to run code that breaks Java's type of safety mechanisms."
The flaw is in an essential security component of the JVM, according to McGraw and an attack program that exploits the flaw has been developed in the lab, in both applet and application form.
Sun admitted that "the bug allows code to get out of the sandbox under circumstances that it should not be allowed to," according to Maxine Erlund, senior engineering manager of Java security and networking in the JavaSoft division at Sun. However, Erlund added, the actual danger from the bug is low.
"The bug is difficult to find, so you'd have to be a real expert to find it. To be affected as a user, you would have to be cruising a Web site with the malicious applet on it," Erlund said. "The most important thing is not to panic. Although the bug is serious in technical terms -- it does pose a security risk ... it's not so serious in practical terms because you'd have to trip over it."
Analysts warn that any hole in a powerful language like Java should be a concern, however.
"The types of exploits that are possible within mobile code like Java and ActiveX can be extremely destructive and in some cases it can be hard to determine if they took place. For that reason, finding holes in Java and in mobile code can be very significant," said Abner Germanow, a senior analyst at International Data Corp. "It's great that the white hat community found it before the black hat community did."
Java 2 was released in December 1998. Sun is providing a patch for the flaw under "Production Releases" on its Web site at http://java.sun.com/products/jdk/1.2/. Netscape is also working on a fix for its systems.
The security flaw exists in several current versions of the Java virtual machine, listed here. (1)-- Sun Java Development Kit 1.1-- Sun Java 2 Software Development Kit 1.2-- Netscape Navigator 4.x(1) Microsoft's latest JVM is not vulnerable to this attack.