CVE-2024-8383
Overview
Background
- External protocol handler
- the mechanism by which a browser hands a URL whose scheme it does not implement (e.g.
news:) off to an operating-system-registered external application. - `network.protocol-handler.external.<scheme>`
- a Firefox preference that, when
true, forces URLs of<scheme>to be routed to an external application instead of being handled internally. - `network.protocol-handler.warn-external.<scheme>`
- a Firefox preference that, when
false, suppresses the confirmation dialog normally shown before Firefox launches an external application for<scheme>. - Usenet schemes
- the
news:,snews:, andnntp:URI schemes historically used to reach Usenet newsgroup content through a dedicated newsreader.
Root Cause Analysis
Firefox ships default preferences in browser/app/profile/firefox.js that classify certain schemes as always-external and simultaneously mark them as safe to launch without a confirmation prompt. For the Usenet schemes, network.protocol-handler.external.news, network.protocol-handler.external.snews, and network.protocol-handler.external.nntp were set to true while the corresponding network.protocol-handler.warn-external.* preferences were set to false, so any news:, snews:, or nntp: URL was dispatched to the OS-registered handler with no user warning. The violated invariant is that Firefox should prompt before handing an unsupported scheme to an arbitrary external program, an invariant Firefox honors for most schemes but had explicitly disabled here. Because no trusted newsreader ships by default on most operating systems, an untrusted downloaded application could register itself as the news:/snews: handler and then be silently launched by a website.
The fix removes both the external.* and warn-external.* preference lines for these schemes, so they fall back to the default behavior in which Firefox asks the user for confirmation before invoking any external handler.
Attack Path
- Register a malicious handler
An unscrupulous application the user has downloaded registers itself with the operating system as the handler for the
news:orsnews:scheme. - Serve a triggering URL
The attacker’s website, having served that download, embeds or navigates to a
news:orsnews:URL. - Silent external dispatch
Firefox consults
network.protocol-handler.external.news/.snews(true) andnetwork.protocol-handler.warn-external.news/.snews(false) and routes the URL to the OS handler with no confirmation dialog. - Arbitrary launch The operating system launches the attacker-registered application, giving the website the ability to start that program at will.
Impact Assessment
news: or snews: scheme. The rated impact is moderate because it depends on that prior attacker-supplied handler registration rather than yielding launch of arbitrary code on its own.Files Changed
browser/app/profile/firefox.js
Audit Directions
- Warn-suppressed external schemesSearch the default preference files for any
network.protocol-handler.external.<scheme>set totruepaired withnetwork.protocol-handler.warn-external.<scheme>set tofalse, and verify each such scheme has a trusted default handler. - Website-reachable launch primitivesReview schemes that web content can trigger to ensure none silently invoke external applications, especially schemes lacking a built-in or platform-trusted handler.
- Legacy protocol defaultsAudit historical or rarely-used protocol defaults (
nntp:,snews:, and similar) that may retain permissive external-dispatch settings inherited from earlier configurations.
Patch
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 07edabb8472..5a54f9ecb75 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1217,18 +1217,12 @@ pref("network.manage-offline-status", true);
// We want to make sure mail URLs are handled externally...
pref("network.protocol-handler.external.mailto", true); // for mail
-pref("network.protocol-handler.external.news", true); // for news
-pref("network.protocol-handler.external.snews", true); // for secure news
-pref("network.protocol-handler.external.nntp", true); // also news
#ifdef XP_WIN
pref("network.protocol-handler.external.ms-windows-store", true);
#endif
// ...without warning dialogs
pref("network.protocol-handler.warn-external.mailto", false);
-pref("network.protocol-handler.warn-external.news", false);
-pref("network.protocol-handler.warn-external.snews", false);
-pref("network.protocol-handler.warn-external.nntp", false);
#ifdef XP_WIN
pref("network.protocol-handler.warn-external.ms-windows-store", false);
#endif