An Applet can't contain native methods for obvious reasons, but many of the core Java classes contain them. For instance all file operations are eventually done by native methods. They are used to do operations that aren't possible or practical to do in pure Java. They may be also used for speed-critical parts of the code. Native methods aren't bound by the Java security policies and can access the processor, operating system, memory, and file system.
Security-wise, native methods are a weak link. Unlike ordinary Java code, they can contain traditional programming flaws like buffer overflows. If an untrusted Java Applet can invoke a native method containing a security flaw, it may be able to escape its sandbox and compromise the system.
In most Java implementations there are a lot of native methods scattered in the core Java classes. Many of them are declared private so that an Applet can't directly invoke them. In some of these cases a hostile Applet may still call another method which in turn may pass some of the parameters to a private native method. If the parameters aren't checked adequately by the Java code passing them, an Applet might be able to do unwanted operations even if the native method doesn't have flaws.
Most of these vulnerabilities do not seem to originate from the original Sun Microsystem's code, but the modifications or additions made by Microsoft. Sun's Java Plug-in was tested against them but no knownly exploitable vulnerabilities seem to exist.
Any detailed technical information has been left out of this advisory in order to prevent exploitation of the vulnerabilities. Due to the educational value it may be published later.
Microsoft was first contacted in July 2002 and started their investigation of potential Java vulnerabilities. More of them were found during August and reported to the vendor. Microsoft has acknowledged most of the vulnerabilities and is currently working on a patch to correct them.
To protect themselves, Internet Explorer and Outlook (Express) users can disable Java Applets until the patch is released. This can be done in Internet Options -> Security -> Internet -> Custom Level -> Microsoft VM, select "Disable Java".
If you want to use an Applet on a certain web site you trust, you can add the site to the Trusted Sites zone and enable Applets in that zone.
By subscribing to our early morning news update, you will receive a daily digest of the latest security news published on Help Net Security.
With over 500 issues so far, reading our newsletter every Monday morning will keep you up-to-date with security risks out there.