Cloudanix VulnDB

CVE-2021-43540

Medium · 6.5

CVSS

6.5

EPSS

0.9%

Published

Dec 8, 2021

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A browser problem let some add-ons leave hidden scripts running on websites even after the add-on was removed, allowing continued activity without the user's knowledge.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Tampering
Component
Application
Class
Authorization Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

WebExtensions granted the required permissions can register and install ServiceWorkers scoped to arbitrary third-party origins; these workers are not removed during extension uninstall, leaving persistent background execution contexts.

Why it matters to the business

Organizations face ongoing risk of unauthorized background scripts on user browsers that survive extension removal, enabling stealthy tracking or actions without ongoing user or admin visibility.

How an attack unfolds

An attacker crafts a signed or sideloaded WebExtension requesting ServiceWorker-related permissions, convinces users to install it, registers persistent workers for chosen third-party sites, then removes the extension so the workers continue executing independently.

How to fix it

Upgrade all affected Mozilla Firefox installations to version 95 or later; audit and remove extensions that request broad ServiceWorker permissions.

How to confirm the fix worked

Confirm Firefox version is 95 or higher via about:support; enumerate registered ServiceWorkers in about:serviceworkers and verify none persist from previously uninstalled extensions.

Typical attack path

  1. Attacker publishes or distributes a WebExtension with ServiceWorker permissions
  2. User installs the extension
  3. Extension registers ServiceWorkers for target third-party origins
  4. Extension is uninstalled or removed
  5. ServiceWorkers remain active and execute on the target sites

How to detect it

Inspect about:serviceworkers and extension storage for registrations originating from extensions no longer present; review browser console or telemetry logs for ServiceWorker install events tied to removed add-ons.

  • about:serviceworkers
  • ServiceWorker register for third-party origin without active extension
  • persistent worker script after extension uninstall

What your security team should do

  • Immediately upgrade Firefox to 95 or newer across the environment
  • Review and restrict WebExtension permissions in enterprise policies
  • Monitor browser update compliance and extension inventories

The record

WebExtensions with the correct permissions were able to create and install ServiceWorkers for third-party websites that would not have been uninstalled with the extension. This vulnerability affects Firefox < 95.

Affected packages

Ecosystem Package Introduced Fixed
Ubuntu:18.04:LTS firefox 0 95.0+build1-0ubuntu0.18.04.1
Ubuntu:20.04:LTS firefox 0 95.0+build1-0ubuntu0.20.04.1
Ubuntu:22.04:LTS firefox 0 95.0+build1-0ubuntu1
openSUSE:Tumbleweed MozillaFirefox 0 95.0-1.1
openSUSE:Tumbleweed firefox-esr 0 128.5.1-1.1

Related vulnerabilities