// back

Oracle Java Web Start 'javaw.exe' JNLP Quote Escaping Command Injection Vulnerability

16.10.12

BACKGROUND

Oracle's JRE is a platform that supports the execution of programs developed using the Java programming language. It is available for multiple platforms, including Windows, Linux and MacOS. The JRE platform also supports Java Applets, which can be loaded from Web pages.

DESCRIPTION

Remote exploitation of a command injection vulnerability in Oracle Corp.'s Java Runtime Environment (JRE) could allow an attacker to execute arbitrary code with the privileges of the current user.

The vulnerability occurs when Java Web Start (JWS) processes a malformed JNLP file. The vulnerability occurs in native code present in the Java Web Start binary. This file is used to initialize JWS, and to provide arguments/data that the applet needs to run. When parsing this file, quotes in certain locations are not properly handled, which can lead to attacker controlled data being passed on the command line to the "javaw.exe" (or the equivalent on Linux/Unix systems) application. This lets an attacker execute arbitrary native code with the privileges of the user (outside of the Java sandbox) by abusing various command line flags.

ANALYSIS

Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the user viewing the Web page. To exploit this vulnerability, a targeted user must load a malicious Web page that an attacker created. An attacker typically accomplishes this via social engineering or injecting content into compromised, trusted sites. After the user visits the malicious web page, no further user interaction is needed.

Since this vulnerability is a command injection vulnerability, and not a memory corruption issue, exploitation mitigation tools like EMET cannot be used to make exploitation more difficult.

DETECTION

Oracle has reported the following products and versions to be vulnerable:

  • Sun Java SE Version 7 Update 7 and before (P-856V-7 Update 7 and before)
  • Sun Java SE Version 6 Update 35 and before (P-856V-6 Update 35 and before)

WORKAROUND

It is possible to disable Java Web Start in Internet Explorer by setting the killbit for the following CLSID:

{5852F5ED-8BF4-11D4-A245-0080C6F74284}

Additionally, removing the file associations for "jnlp" files will prevent Internet Explorer and other browsers from automatically opening the file. This can be performed by removing the following registry keys:

  • HKLMSoftwareClasses.jnlp
  • HKLMSoftwareClassesJNLPfile
  • HKLMSoftwareClassesMIMEDatabaseContent Typeapplication/x-java-jnlp-file

VENDOR RESPONSE

Oracle Corp. has released an update which addresses this issue. For more information, consult their advisory at the following URL:

http://www.oracle.com/technetwork/topics/security/javacpuoct2012-1515924.html

CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2012-1532 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org/), which standardizes names for security problems.

DISCLOSURE TIMELINE

07/03/2012 Initial Vendor Notification
07/03/2012 Initial Vendor Reply
10/16/2012 Coordinated Public Disclosure

CREDIT

This vulnerability was reported to iDefense by Chris Ries.

Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php

Free tools, research and upcoming events
http://labs.idefense.com/

LEGAL NOTICES

Copyright © 2012 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.