Vulnerability Note VU#648758

Mozilla Firefox executes JavaScript in the "IconURL" parameter of "InstallTrigger.install()" with chrome privileges

Original Release date: 10 May 2005 | Last revised: 01 Aug 2005

Overview

Mozilla Firefox may execute JavaScript contained within the IconURL parameter of InstallTrigger.install() with chrome privileges. This may allow an attacker to execute arbitrary commands on a vulnerable system.

Description

XPInstall

XPInstall is a cross-platform software installation method used by Mozilla-based browsers.

Chrome

The Mozilla user interface components outside of the content area are created using chrome. This includes toolbars, menu bars, progress bars, and window title bars. Chrome provides content, locale, and skin information for the user interface.

Chrome Script

Chrome scripts have privileges that web scripts do not. Chrome scripts do not prompt for permission before executing potentially dangerous commands, such as creating or calling XPCOM components.

JavaScript Eval Function

The JavaScript eval()function evaluates and/or executes the specified code. For example, either of the following URLs will display an alert dialog containing the text "Hello world.":

javascript:eval('alert("Hello world.")')

javascript:alert("Hello world.")

The Problem

The IconURL parameter of the XPInstall InstallTrigger accepts JavaScript URIs (in-line JavaScript) as input. This JavaScript can execute with chrome privileges if it contains eval(). By granting UniversalXPConnect privileges to itself, a chrome script can gain unrestricted access to browser APIs using XPConnect. A script with these privileges may create and execute arbitrary files on the local filesystem.

The Mozilla Suite does not appear to be affected because it does not use the IconURL parameter.

Impact

By convincing a user to view an HTML document (e.g., a web page), an attacker could execute arbitrary commands or code with the privileges of the user. The attacker could take any action as the user. If the user has administrative privileges, the attacker could take complete control of the user's system.
Note that Mozilla Firefox enables by default a "whitelist" feature for XPInstall. This means that an attacker must have control of a site listed in the whitelist to successfully exploit this vulnerability. The default sites in the whitelist are addons.mozilla.org and update.mozilla.org. Several changes have been made to these sites to help prevent an attacker from using these sites for exploitation.

Solution

Upgrade
This issue is resolved in Firefox 1.0.4.


Workarounds

Disable software installation

In the Firefox preferences, disable "Allow web sites to install software." This prevents the web browser from executing the vulnerable InstallTrigger method.

Systems Affected (Learn More)

VendorStatusDate NotifiedDate Updated
MozillaAffected-10 May 2005
Red Hat Software, Inc.Affected-01 Aug 2005
If you are a vendor and your product is affected, let us know.

CVSS Metrics (Learn More)

Group Score Vector
Base N/A N/A
Temporal N/A N/A
Environmental N/A N/A

References

Credit

This vulnerability was reported by Paul of Greyhats and Michael Krax. Thanks to Daniel Veditz of the Mozilla Foundation for discussing the vulnerability.

This document was written by Will Dormann.

Other Information

  • CVE IDs: CAN-2005-1477
  • Date Public: 07 May 2005
  • Date First Published: 10 May 2005
  • Date Last Updated: 01 Aug 2005
  • Severity Metric: 8.57
  • Document Revision: 19

Feedback

If you have feedback, comments, or additional information about this vulnerability, please send us email.