search menu icon-carat-right cmu-wordmark

CERT Coordination Center

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

Vulnerability Note VU#648758

Original Release Date: 2005-05-10 | Last Revised: 2005-08-01

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.

Vendor Information

648758
 

Mozilla Affected

Updated:  May 10, 2005

Status

Affected

Vendor Statement

We have not received a statement from the vendor.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see Mozilla Foundation Security Advisory 2005-42.

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

Red Hat Software, Inc. Affected

Updated:  August 01, 2005

Status

Affected

Vendor Statement

Updated Mozilla packages (for Red Hat Enterprise Linux 4, 3, and 2.1) and
updated Firefox packages (for Red Hat Enterprise Linux 4) to correct this
issue are available at the URL below and by using the Red Hat Network
'up2date' tool.

http://rhn.redhat.com/errata/CAN-2005-1477.html

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

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: CVE-2005-1477
Severity Metric: 8.57
Date Public: 2005-05-07
Date First Published: 2005-05-10
Date Last Updated: 2005-08-01 14:10 UTC
Document Revision: 19

Sponsored by CISA.