Closed Bug 284627 Opened 15 years ago Closed 15 years ago
arbitrary code execution via sidebar
679 bytes, text/html
519 bytes, text/html
892 bytes, text/html
519 bytes, text/html
1.10 KB, text/html
3.98 KB, patch
|Details | Diff | Splinter Review|
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050302 Firefox/1.0+ Sidebar allows an attacker to link to the privileged content (such as about:config) and run arbitrary code on the content. Reproducible: Always Steps to Reproduce: 1. Bookmark testcase as sidebar panel 2. Click links in order Actual Results: about:config is loaded. "browser.startup.homepage" will be overwritten. Further attacks can be done successfully. Expected Results: Link to the privileged content should be blocked.
Use this page to add the testcase to bookmark panel.
Sorry for spam... Steps to Reproduce (corrected): 1. Bookmark testcase as sidebar panel 2. Select "Sidebar Attack Test" from your bookmark and load it in the sidebar 3. Click links in order
This test case will erase localstore.rdf file in your profile directory.
Use this page to add the testcase 2 to bookmark panel.
> 1. Bookmark testcase as sidebar panel Is this a Firefox-specific feature? I don't see a way to do this in Mozilla...
Assignee: dveditz → firefox
Status: UNCONFIRMED → NEW
Component: Security: General → General
Ever confirmed: true
Product: Core → Firefox
QA Contact: general
There also seems to be no "security" component for Firefox, so putting in General, I guess.... This sounds like a pretty critical issue to me, though.
Attachment #176416 - Flags: review?(bugs)
Comment on attachment 176416 [details] [diff] [review] add security check to web panel links firstname.lastname@example.org
Attachment #176416 - Flags: review?(bugs) → review+
15 years ago
Attachment #176416 - Flags: approval-aviary1.0.2?
Comment on attachment 176416 [details] [diff] [review] add security check to web panel links Any way to fix this via an update to the two .js files, not a full app update? /be
Attachment #176416 - Flags: approval-aviary1.0.2? → approval-aviary1.0.2+
mconnor, thanks for patching. /be
Not specifically the two js files, but both are contained in browser.jar and we can just install a new copy over top with an XPI. Zipped, the current browser.jar is 261k on Windows.
yeah, that sounds like a reasonable solution provided the firefox user has write permission to the installation directory.
"data:" URL example.
Hmm, the downside of the XPI route is the old "running 'sudo firefox' nukes bookmarks and friends" problem that hit people the last time we issued an XPI security release. If we go down that route, we need to have a significant warning in the instructions for *nix boxes.
Comment on attachment 176416 [details] [diff] [review] add security check to web panel links Er... Can't sites change what document.location returns by setting up Js object setters, etc? As in, don't you need a sprinkling of XPCNativeWrapper in this code? Specifically: 1) You want to get the ownerDocument from a wrapper (say change |wrapper| to also expose ownerDocument). 2) You then want to wrap the document before getting .location. 3) You probably also want to wrap the location object itself... Marking review-, since this patch doesn't actually prevent a sufficiently malicious site from exploiting this code...
Attachment #176416 - Flags: review+ → review-
Attachment #176487 - Flags: approval-aviary1.0.2?
I assume these flags were group-moved to 1.0.3, we really want this in 1.0.2 I think.
Yes, we want this in 1.0.2
Comment on attachment 176487 [details] [diff] [review] patch with more wrapper-fu a=asa for 1.0.2 landing.
Attachment #176487 - Flags: approval-aviary1.0.3? → approval-aviary1.0.2+
Comment on attachment 176487 [details] [diff] [review] patch with more wrapper-fu setting review flags
Attachment #176487 - Flags: review?(bzbarsky) → review+
Comment on attachment 176487 [details] [diff] [review] patch with more wrapper-fu sr=dveditz bz says he gave a verbal r= to this patch when it was first posted, just never made it into the bug.
Attachment #176487 - Flags: superreview?(dveditz) → superreview+
Fix checked in to trunk and aviary-1.0.1 branch
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
this also looks good using 2005031707-1.0.2 firefox bits on linux fc3 with the 2 test cases.
looks good on Windows 2005-03-17-06-aviary1.0.1
Status: RESOLVED → VERIFIED
Reference id: CAN-2005-0402
Whiteboard: [sg:fix] → [sg:fix] CAN-2005-0402
Advisory published: http://www.mozilla.org/security/announce/mfsa2005-31.html
(In reply to comment #2) > Created an attachment (id=176153)  > add sidebar panel page The following errors go out to JavaScrip Console when this test case is executed. Error: makeURI is not defined Source File: chrome://browser/content/contentAreaUtils.js Line: 108 Windows XP SP1 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
You need to log in before you can comment on or make changes to this bug.