Medium CVSS 7.5 firefox Logic Error 🔧 Commit mapped

Overview

Medium
Severity
7.5
CVSS
No
Exploited ITW
Fixed
Fix Status
Impactmoderate
DescriptionFirefox normally asks for confirmation before asking the operating system to find an application to handle a scheme that the browser does not support. It did not ask before doing so for the Usenet-related schemes news: and snews:. Since most operating systems don't have a trusted newsreader installed by default, an unscrupulous program that the user downloaded could register itself as a handler. The website that served the application download could then launch that application at will.
ComponentCore
Bug ClassLogic Error
Tracker1908496
Fix commit9b4a0e1f729f (firefox) +0/-6
CWECWE-1188 (Insecure default initialization of resource)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CISA KEVNot listed
CreditedD7
Disclosed2024-09-03

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:, and nntp: 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.

Key insight
The single mistake was pairing an “always route externally” preference with a “never warn” preference for schemes that have no trusted default handler, which turned a website-controllable scheme into a silent external-launch primitive; the fix removes those preferences so the default confirmation prompt is restored.

Attack Path

  1. Register a malicious handler An unscrupulous application the user has downloaded registers itself with the operating system as the handler for the news: or snews: scheme.
  2. Serve a triggering URL The attacker’s website, having served that download, embeds or navigates to a news: or snews: URL.
  3. Silent external dispatch Firefox consults network.protocol-handler.external.news/.snews (true) and network.protocol-handler.warn-external.news/.snews (false) and routes the URL to the OS handler with no confirmation dialog.
  4. Arbitrary launch The operating system launches the attacker-registered application, giving the website the ability to start that program at will.

Impact Assessment

An attacker gains the ability to silently launch a previously downloaded, attacker-controlled application from web content, without the confirmation prompt that would normally alert the user. This occurs in the context of Firefox’s external-protocol dispatch on the user’s machine and requires that the user has already downloaded and run (or otherwise allowed to register) a malicious program that claims the 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 schemes
    Search the default preference files for any network.protocol-handler.external.<scheme> set to true paired with network.protocol-handler.warn-external.<scheme> set to false, and verify each such scheme has a trusted default handler.
  • Website-reachable launch primitives
    Review 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 defaults
    Audit historical or rarely-used protocol defaults (nntp:, snews:, and similar) that may retain permissive external-dispatch settings inherited from earlier configurations.
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
Loading diff…