Closed
Bug 1315435
(CVE-2016-9903)
Opened 8 years ago
Closed 8 years ago
Intentional XSS injection hole in add-ons SDK
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(firefox50 fixed, firefox51 fixed, firefox52 fixed)
RESOLVED
FIXED
mozilla52
People
(Reporter: kmag, Assigned: kmag)
References
Details
(Keywords: sec-moderate, Whiteboard: [qa-][adv-main50.1+])
Attachments
(1 file)
4.50 KB,
patch
|
mossop
:
review+
gchang
:
approval-mozilla-beta+
ritu
:
approval-mozilla-release+
abillings
:
sec-approval+
|
Details | Diff | Splinter Review |
I honestly don't know if or how this exploitable, but the SDK bundles a world-accessible file with an intentional HTML injection vulnerability:
http://searchfox.org/mozilla-central/rev/f5c9e9a249637c9abd88754c8963ecb3838475cb/addon-sdk/source/lib/sdk/ui/frame/view.html#17
document.documentElement.innerHTML = atob(location.hash.substr(1));
This file is accessible to the entire web at resource://gre/modules/commonjs/sdk/ui/frame/view.html in the stock browser, and at various other locations in add-ons with bundled copies of the SDK. In the latter case, it can probably at the least be used to access the add-on's localStorage, or to trick unwary content scripts. It's probably exploitable in other ways too, though.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8807910 -
Flags: review?(dtownsend)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → kmaglione+bmo
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•8 years ago
|
||
Jorge,
Can you please look into notifying the authors of AMO add-ons that bundle this file that they need to remove their bundled copies of the SDK, and block the ones that don't do so promptly? This could be an especially dangerous exploit in the case of add-ons that use localStorage or load content scripts into URLs belonging to their add-on.
Flags: needinfo?(jorge)
Comment 3•8 years ago
|
||
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
Review of attachment 8807910 [details] [diff] [review]:
-----------------------------------------------------------------
::: addon-sdk/source/lib/sdk/ui/frame/view.html
@@ +2,5 @@
> +<html>
> + <head>
> + <script>
> + // HACK: This is not an ideal way to deliver chrome messages
> + // to a innef frame content but seems only way that would
I know you didn't write it but let's fix the innef typo here
Attachment #8807910 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 4•8 years ago
|
||
Somewhat arbitrarily calling this sec-high, since I'm not actually sure of the implications.
Keywords: sec-high
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
[Security approval request comment]
How easily could an exploit be constructed based on the patch?
Not easily.
Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?
No.
Which older supported branches are affected by this flaw?
All.
Do you have backports for the affected branches? If not, how different, hard to create, and risky will they be?
The patch should apply cleanly on all branches.
How likely is this patch to cause regressions; how much testing does it need?
Very unlikely.
Attachment #8807910 -
Flags: sec-approval?
Comment 6•8 years ago
|
||
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
sec-approval+
Do we need to take this patch on branches?
Attachment #8807910 -
Flags: sec-approval? → sec-approval+
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Al Billings [:abillings] from comment #6)
> Do we need to take this patch on branches?
Probably. I don't have a good proof of concept exploit for the in-tree version of this, but anyone who put in some effort probably could. The fix is fairly low-risk, in any case.
Assignee | ||
Comment 8•8 years ago
|
||
I guess Jorge is busy traveling. Andreas or Andrew, can one of you please take care of the add-ons this affects, per comment 2?
Thanks
Flags: needinfo?(awilliamson)
Flags: needinfo?(awagner)
Updated•8 years ago
|
Flags: needinfo?(awilliamson)
Assignee | ||
Comment 9•8 years ago
|
||
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
Approval Request Comment
[Feature/regressing bug #]: Bug 787390
[User impact if declined]: This is an easily exploitable XSS/privilege escalation vulnerability, but the potential impact is unclear.
[Describe test coverage new/current, TreeHerder]: There are tests for this feature, but not for this security issue.
[Risks and why]: Low. This is a fairly simple change that removes a DOM to HTML to DOM round trip, and an accompanying security hole, but otherwise changes very little.
[String/UUID change made/needed]: None.
Attachment #8807910 -
Flags: approval-mozilla-release?
Attachment #8807910 -
Flags: approval-mozilla-beta?
Attachment #8807910 -
Flags: approval-mozilla-aurora?
Comment 11•8 years ago
|
||
20 add-ons are affected, we'll reach out to them next week.
Comment 12•8 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 13•8 years ago
|
||
Developer outreach blocked on bug 1317288.
Updated•8 years ago
|
Flags: needinfo?(jorge)
Assignee | ||
Comment 14•8 years ago
|
||
These are the affected add-ons I can find in my most recent local snapshot:
https://addons.mozilla.org/editors/review/art-site-download-helper/
https://addons.mozilla.org/editors/review/care-to-search/
https://addons.mozilla.org/editors/review/geckoprofiler/
https://addons.mozilla.org/editors/review/google-translate-ترجمة-قوقل/
https://addons.mozilla.org/editors/review/iifl-india-infoline/
https://addons.mozilla.org/editors/review/newzsocial-plug-in/
https://addons.mozilla.org/editors/review/paste-and-go-hotkey-keyboar/
https://addons.mozilla.org/editors/review/remove-image-links/
https://addons.mozilla.org/editors/review/shop-rewardde/
https://addons.mozilla.org/editors/review/solimoov/
https://addons.mozilla.org/editors/review/wakelet/
https://addons.mozilla.org/editors/review/wisestamp-email-signature-gmai/
https://addons.mozilla.org/editors/review/youtube-video-downloader-and-c/
https://addons.mozilla.org/editors/review/youtube_homefilter/
Assignee | ||
Updated•8 years ago
|
Attachment #8807910 -
Flags: approval-mozilla-aurora?
status-firefox50:
--- → affected
status-firefox51:
--- → affected
Comment 15•8 years ago
|
||
web content can't link or open resource:// or chrome:// urls. How would this be exploited by web content? Do we have features that take arbitrary web content (from messages? urls?) and passes them to a frame containing this content?
IOW is this automatically a vulnerability, or is it a foot-gun that requires the add-on to also do something specific and probably ill-advised?
Assignee | ||
Comment 16•8 years ago
|
||
Hm. You're right, web content can only directly load the URLs as resources, not as documents, so I think it requires another vulnerability to exploit.
Comment 17•8 years ago
|
||
So, do we still need to reach out to developers and block the affected add-ons if they don't respond/fix it?
Flags: needinfo?(awagner) → needinfo?(kmaglione+bmo)
Updated•8 years ago
|
Group: toolkit-core-security → core-security-release
Comment 18•8 years ago
|
||
Hi Kris,
When you nominate the uplift request, aurora is 51, beta is for 50, and release is for 49. Since the merge days is passed, is this worth uplifting to 51 beta?
Assignee | ||
Comment 19•8 years ago
|
||
(In reply to Andreas Wagner [:TheOne] from comment #17)
> So, do we still need to reach out to developers and block the affected
> add-ons if they don't respond/fix it?
Yes. The issue isn't as severe as I originally thought, but it's still severe.
(In reply to Gerry Chang [:gchang] from comment #18)
> Hi Kris,
> When you nominate the uplift request, aurora is 51, beta is for 50, and
> release is for 49. Since the merge days is passed, is this worth uplifting
> to 51 beta?
Yes. I canceled the aurora uplift request after the merge, but I'd still like to uplift to the other channels.
Flags: needinfo?(kmaglione+bmo)
Comment 20•8 years ago
|
||
Developers have been notified in bug 1318453.
Comment 21•8 years ago
|
||
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
Fix a sec-high. Beta51+. Should be in 51 beta 2.
NI Ritu for considering uplifting to 50.1/50 dot release.
Flags: needinfo?(rkothari)
Attachment #8807910 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 22•8 years ago
|
||
Comment 23•8 years ago
|
||
Is there necessary any manual testing around this bug? If yes, could you please provide some reliable steps? Or it would be preferable to perform exploratory testing around the add-ons mentioned in Comment 14?
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 24•8 years ago
|
||
There's probably not much point in manual testing. It might be a good idea to do some testing of add-ons that (directly or indirectly) use the ui/frame module, but if this were going to cause breakage there, we almost certainly have seen it by now.
Flags: needinfo?(kmaglione+bmo)
Whiteboard: [qa-]
I would prefer to keep the fixes for 50.0.1 release (planned to gtb and push this week) to a minimal set of required fixes. I think we should take this in the planned 50.1.0 release. Please let me know if there are any concerns.
Flags: needinfo?(rkothari)
Assignee | ||
Comment 26•8 years ago
|
||
50.1.0 sounds fine to me.
Assignee | ||
Comment 27•8 years ago
|
||
Based on comment 15, dropping this to sec-moderate, since it should only be exploitable in combination with other vulnerabilities.
Keywords: sec-high → sec-moderate
Comment on attachment 8807910 [details] [diff] [review]
Fix intentional, gaping XSS hole.
Meets the triage bar for 50.1.0
Attachment #8807910 -
Flags: approval-mozilla-release? → approval-mozilla-release+
Updated•8 years ago
|
Whiteboard: [qa-] → [qa-][adv-main50.1+]
Updated•8 years ago
|
Alias: CVE-2016-9903
Updated•7 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•