Vulnerability Note VU#648758
Mozilla Firefox executes JavaScript in the "IconURL" parameter of "InstallTrigger.install()" with chrome privileges
OverviewMozilla 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.
I. DescriptionXPInstall
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.
II. ImpactBy 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.
III. SolutionUpgrade
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
References
http://www.mozilla.org/security/announce/mfsa2005-42.html
http://www.mozilla.org/security/announce/mfsa2005-43.html
http://www.mozilla.org/security/announce/mfsa2005-44.html
http://www.frsirt.com/english/advisories/2005/0493
http://secunia.com/advisories/15292/
http://www.securityfocus.com/archive/1/397817/2005-05-07/2005-05-13/0
http://greyhatsecurity.org/vulntests/ffrc.htm
http://www.securitytracker.com/alerts/2005/May/1013913.html
http://www.securityfocus.com/bid/13544668916
6
http://www.osvdb.org/displayvuln.php?osvdb_id=16185
https://bugzilla.mozilla.org/show_bug.cgi?id=293302
https://bugzilla.mozilla.org/show_bug.cgi?id=292691
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
| Date Public: | 2005-05-07 |
| Date First Published: | 2005-05-10 |
| Date Last Updated: | 2005-08-01 |
| CERT Advisory: | |
| CVE-ID(s): | CAN-2005-1477 |
| NVD-ID(s): | CAN-2005-1477 |
| US-CERT Technical Alerts: | |
| Metric: | 8.57 |
| Document Revision: | 19 |
If you have feedback, comments, or additional information about this vulnerability, please send us
email.
|