SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com






Category:   Application (Web Browser)  >   Mozilla Firefox Vendors:   Mozilla.org
Mozilla Firefox 'location.hostname' Property Lets Remote Users Bypass Domain Security Restrictions
SecurityTracker Alert ID:  1017654
SecurityTracker URL:  http://securitytracker.com/id/1017654
CVE Reference:   CVE-2007-0981   (Links to External Site)
Updated:  Feb 23 2007
Original Entry Date:  Feb 15 2007
Impact:   Disclosure of authentication information, Disclosure of system information, Disclosure of user information, Modification of authentication information, Modification of system information, Modification of user information
Fix Available:  Yes  Vendor Confirmed:  Yes  Exploit Included:  Yes  
Version(s): 2.0.0.1 and prior 2.x versions; also versions prior to 1.5.0.10
Description:   A vulnerability was reported in Mozilla Firefox. A remote user can bypass domain security restrictions.

A remote user can create HTML to write a specialy crafted hostname value to the 'location.hostname' DOM property that, when processed by Firefox, will be interpreted differently by different parts of the browser's code. A hostname containing a null character ('\x00'), such as 'evil.com\x00foo.example.com', may be interpreted by the DOM code as part of the 'example.com' domain and interpreted by the DNS resolver code as 'evil.com'.

As a result, a remote user can create HTML that can set cookies in an arbitrary domain and modify the 'document.domain' property to bypass the same-origin policy for XMLHttpRequest() access and cross-frame and cross-window access.

A demonstration exploit is available at:

http://lcamtuf.dione.cc/ffhostname.html

The original bug report is available at:

https://bugzilla.mozilla.org/show_bug.cgi?id=370445

Michal Zalewski reported this vulnerability.

Impact:   A remote user can bypass domain security restrictions.
Solution:   The vendor has issued a fix (1.5.0.10, 2.0.0.2).

The Mozilla advisory is available at:

http://www.mozilla.org/security/announce/2007/mfsa2007-07.html

Vendor URL:  www.mozilla.org/security/announce/2007/mfsa2007-07.html (Links to External Site)
Cause:   Access control error
Underlying OS:   Linux (Any), UNIX (Any), Windows (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Feb 24 2007 (Red Hat Issues Fix) Mozilla Firefox 'location.hostname' Property Lets Remote Users Bypass Domain Security Restrictions   (bugzilla@redhat.com)
Red Hat has released a fix for Red Hat Enterprise Linux 4.



 Source Message Contents

Date:  Wed, 14 Feb 2007 23:23:01 +0100 (CET)
Subject:  [Full-disclosure] Firefox: serious cookie stealing / same-domain

There is a serious vulnerability in Mozilla Firefox, tested with 2.0.0.1,
but quite certainly affecting all recent versions.

The problem lies in how Firefox handles writes to the 'location.hostname'
DOM property. It is possible for a script to set it to values that would
not otherwise be accepted as a hostname when parsing a regular URL -
including a string containing \x00.

Doing this prompts a peculiar behavior: internally, DOM string variables
are not NUL-terminated, and as such, most of checks will consider
'evil.com\x00foo.example.com' to be a part of *.example.com domain. The
DNS resolver, however, and much of the remaining browser code, operates on
ASCIZ strings native to C/C++ instead, treating the aforementioned example
as 'evil.com'.

This makes it possible for evil.com to modify location.hostname as
described above, and have the resulting HTTP request still sent to
evil.com. Once the new page is loaded, the attacker will be able to set
cookies for *.example.com; he'll be also able to alter document.domain
accordingly, in order to bypass the same-origin policy for XMLHttpRequest
and cross-frame / cross-window data access.

A quick demonstration is available here:

  http://lcamtuf.dione.cc/ffhostname.html

If you want to confirm a successful exploitation, check Tools -> Options
-> Privacy -> Show Cookies... for coredump.cx after the test; for the demo
to succeed, the browser needs to have Javascript enabled, and must accept
session cookies.

The impact is quite severe: malicious sites can manipulate authentication
cookies for third-party webpages, and, by the virtue of bypassing
same-origin policy, can possibly tamper with the way these sites are
displayed or how they work.

Regards,
/mz
http://lcamtuf.coredump.cx/

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2014, SecurityGlobal.net LLC