FYI: web_accessible_resources & UUID [Bug 1372288, 1405971]
NOTE: the vetting we did on system addons and some extensions is no longer maintained here, some checks were last updated in Feb 2018. It is up to you to vet your extensions for this issue.
Update (Dec 11th 2019)
If we recommend a web extension, lets make sure it doesn't leak UUIDs
@gorhill @mrdokenny @idlewan @tumpio @einaregilsson @meh @Synzvato @EFForg @kkapsner @greasemonkey @sibiantony
^^ sorry for all the @'s, hopefully this will bring it to your attention if you weren't aware, and appreciate your time if you can spare it for a quick answer, otherwise we can dig in ourselves. This issue may be fixed by Mozilla, but it would be good to know if these WE's are not affected, or can be fixed to not leak - thanks
- Issue is here and some subsequent comments
- PoC
- ghacks article
- Whitepaper
- Update: 1372288 - ~~currently access denied, will be opened up soon~~
- Update2: 1405971
system addons
- [x] Activity Stream
- [x] Flyweb
- [x] Follow On Search
- [x] Form Autofill
- [x] Onboarding
- [x] Pocket
- [x] :x: Screenshots - requires user interaction with the WE - PoC
- [x] Shield
- [x] Web Compatibility Reporter
==> Screenshots is the only system addon affected ATM(!) ===> see .extension.getURL + path:browser/extensions/ web_accessible_resources
web extensions
- [x] CanvasBlocker - v0.4.0.2 has no web_accessible_resources
- [x] ClearURLs - v1.2 has no web_accessible_resources
- [x] Cookie Auto-Delete - v1.4.3 has no web_accessible_resources
- [x] Decentraleyes - v2.0.0beta1 * web_accessible_resources are declared but are never exposed to the DOM * see Synzvato's comment below
- [x] Greasemonkey - v4.0 has no web_accessible_resources
- [x] Header Editor - v2.3.5 has no web_accessible_resources
- [x] HTTPS Everywhere - v2017.8.28.1337 has no web_accessible_resources
- [x] Link Cleaner - v1.5 has no web_accessible_resources - idlewan
- [x] Neat URL l - v2.0.5 has no web_accessible_resources
- [x] NoScript - v10.1.5.1 - has no web_accessible_resources
- [x] Request Control - v1.8.2 has no web_accessible_resources
- [x] Redirector - v3.1.0 has no web_accessible_resources
- [x] Skip Redirect - 2.2.1 has no web_accessible_resources
- [x] Smart Referer - v0.2.3 has no web_accessible_resources
- [x] ViolentMonkey - v2.8.10f - has no web_accessible_resources
- [x] uBlock Origin 1
- starting with 1.15.7b0+ web_accessible_resources are declared but are never exposed to the DOM
- see gorhill's comment below
- [x] uMatrix 1 - does not declare web_accessible_resources - gorhill
[1] and FYI the legacy versions do not expose resource://
other web ext
- [x] Stylus - v1.1.3.1 - has no web_accessible_resources
web extensions not ready yet
- SSleuth - very unlikely to use web_accessible_resources - sibiantony
...
The system addons that came with nightly 57 can no longer be extracted with Windows Explorer on Win7. Do I really need to use a linux VM whenever I want to extract one of those bastards?! Does someone know of another way to extract them? Are there maybe even plans to pack normal addons in the same way in the future?! WTH mozilla, was that really necessary?!?
Greasemonkey (not sure where they are with WE)
Not yet: https://github.com/greasemonkey/greasemonkey/issues/2551 GM version 4.0 eventaully will.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/web_accessible_resources
This UUID is randomly generated for every browser instance and is not your extension's ID. This prevents websites from fingerprinting the extensions a user has installed.
FWIW, you can check if an extension has web_accessible_resources by checking its manifest.json.
Does it only affect extensions that have a content script? Are extensions using exclusively a background script affected as well?
It's the websites that lurk via moz-extension://
Webextentions have limited access to behind-the-scene network requests, unlike uBO/legacy which has full access to all behind-the-scene network requests.
You won't be able to see (and block) network requests made by other extensions.
See: https://github.com/gorhill/uBlock/wiki/Firefox-WebExtensions#differences-with-ubolegacy
Does it only affect extensions that have a content script? Are extensions using exclusively a background script affected as well?
No, afaik only WebExtensions with web_accessible_resources
edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1372288#c19
Things that are web-accessible are presumably used by extensions in web content (not always -- sometimes they're used in an extension's own page).
CanvasBlocker uses content scripts but I do not see how it could leak the UUID.
PS: CB is not yet a WebExtension because of a missing API.
We'd have to re-check every new version of every WE we recommend. Lets just wait and see what the fix will look like before we pack another shitload of work on our backs.
I understand that. This was more of a wake up, initial check and if the WE devs are aware*, they know to steer clear of it. Its not an easy fix within Firefox by the sounds of it. The ticket is now open. 3 months and not much visible activity. Suddenly (90 days later?) the whitepaper is published. The PoC (and article) probably helped sway the decision to open the ticket. And we have a flurry of comments.
I do not see this being resolved in time for ESR, let alone 57. So it would be nice to know for those if any of these WE can leak - including those not WE yet.
SSleuth has no WE yet, due to missing API.
Also, very likely it wouldn't need web_accessible_resources
Does someone know of another way to extract them?
@earthlng: Let me know. https://github.com/Theemim/GeckoScratchpadSnippets/blob/master/GeckoZipReader.js
Thanks @sibiantony - is it this one?: https://bugzilla.mozilla.org/show_bug.cgi?id=1322748
PS: I don't expect devs to work around this. I expect Mozilla to work out a better permissions model, but it sounds complicated.
Thanks @sibiantony - is it this one?: https://bugzilla.mozilla.org/show_bug.cgi?id=1322748 PS: I don't expect devs to work around this. I expect Mozilla to work out a better permissions model, but it sounds complicated.
@Thorin-Oakenpants Yes, that's the one. If you meant the TLS API to be worked around, I don't think there exist a work around. Chrome doesn't support such an API either. And there is recent push for an API, thanks to EFF.
In Link Cleaner's case, it doesn't inject anything into web pages and doesn't have any web_accessible_resources, so it shouldn't be affected.
lets make sure it doesn't leak UUIDs
uBO does not declare web_accessible_resources (webext), and neither expose resource:// (legacy) to outside world.
Same with uMatrix, no web_accessible_resources, neither resource://.
@Theemim holy shit man, you're a fucking god! Thanks mate!! :+1: :+1: :+1: https://bugzilla.mozilla.org/show_bug.cgi?id=1352595 - it looks like, hopefully, for the time being it will only be used for nightly. Also found this: https://github.com/mcmilk/7-Zip-zstd/issues/26 (aaaaahhhhh shit, now I've cross-referenced it again! DOH!)
Even though both Firefox Screenshots and Decentraleyes make use of the web_accessible_resources manifest key, they are not equally vulnerable. It's never good to expose secrets to untrusted code.
The proof of concept relies on the fact that Firefox Screenshots creates an anchor element with a src attribute, that points to a web accessible resource. It depends on the UUID being directly exposed within the DOM of the document in question. Decentraleyes does not write resource locations into pages.
Another way of obtaining the UUID, would be to send out an XHR, and then reading the value of the responseURL property of the corresponding XMLHttpRequest object. However, cross-origin requests will not leak the UUID either. They fail due to the absence of Access-Control-Allow-Origin headers.
Based on what I have stated above, I do not believe Decentraleyes is currently leaking out unique user identifiers. That said, of course, please do get in touch if you think I'm overlooking something.
@Thorin-Oakenpants
what about uMatrix WE?
Today I prepped it up for release, but then I realized I will have to wait for Firefox 56, there is a bug that was fixed in it, which I consider crippling in Firefox 55: https://bugzilla.mozilla.org/show_bug.cgi?id=1324499.
Thanks for clarifying @Thorin-Oakenpants, and no worries! I completely understand.
PS: Thanks for all your work porting to WE
You're welcome, and I'm happy to hear you appreciate the work!
First, the "greasemonkey" user is a project user that no human ever logs in to (nor will ever see at-mentions of). Second the above-linked bug is just the "port user data" (from legacy->webext) issue.
Third: I have always had issues with Mozilla's documentation ever since starting WebExt porting work, but this sounds like an even bigger one. Hilariously:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/web_accessible_resources
This UUID is randomly generated for every browser instance and is not your extension's ID. This prevents websites from fingerprinting the extensions a user has installed.
If I've interpreted the giant thread above correctly, the true fact is that ever using web_accessible_resources creates a possible/likely privacy leak for users, but instead the documentation only talks about the benefits. If so, that should be the giant/bold/red/first thing on the relevant page. Either way, something about this issue should be.
My work-in-progress Greasemonkey port does use web_accessible_resources . Because there are so few/crappy UI options available to WebExtensions. Where are my chrome-free dialogs? An entire tab, or a modal-only window with a giant UUID/URL covering the entire title bar is not enough.