Public Vulnerability Reports

Sun Java Runtime Environment AWT ImageRep Heap Buffer Overflow Vulnerability



The Sun Java Runtime Environment (JRE) is Sun Microsystems Inc.'s implementation of the Java run-time. The Abstract Window Toolkit (AWT) is a Java cross-platform set of classes for creating graphical user interface (GUI) applications. For more information, visit the links shown below.


Remote exploitation of a heap-based buffer overflow vulnerability in Sun's Java Runtime Environment (JRE) allows attackers to execute arbitrary code with the privileges of the current user.

This vulnerability exists due to insufficient input validation when passing parameters from Java code into native methods. When specific methods within certain classes are overridden an attacker can pass values which lead to arbitrary control over a call to 'memcpy' in the underlying native code. This results in an exploitable heap buffer overflow condition.


Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the current user. In order to exploit this vulnerability, a user must load a web page containing a specially crafted Java applet. An attacker typically accomplishes this via social engineering or injecting content into compromised, trusted sites. Typical social engineering attacks will pass URLs as part of instant messages or electronic mail.


iDefense confirmed the existence of this vulnerability using version 1.6.0u15 of Sun's Java Runtime Environment on Windows XP. Tests were conducted using Internet Explorer 8 as well as Mozilla Firefox 3.5.2. Other versions, as well as those for other platforms, are suspected to be vulnerable.


In order to prevent exploitation of this vulnerability, iDefense recommends disabling the Java plug-in within the browser.


Sun Microsystems Inc. has released a patch which addresses this issue. For more information, consult their advisory at the following URL:


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2009-3871 to this issue. This is a candidate for inclusion in the CVE list (, which standardizes names for security problems.


08/27/2009 - Initial Contact
08/27/2009 - PoC Sent
11/03/2009 - Coordinated public disclosure


This vulnerability was reported to iDefense by regenrecht.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright © 2010 Verisign, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customer service for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.