CVE-2021-21166 — Google Chromium Race Condition Vulnerability

CVE-2021-21166

Chrome Audio/Stream Component — Race Condition Zero-Day Enables Heap Corruption and Remote Code Execution; Second Chrome Zero-Day of Q1 2021

What is Chrome's Object Lifecycle Management?

Modern web browsers like Chrome manage complex object lifecycles across multiple threads — the renderer process handles DOM manipulation, JavaScript execution, media processing, and layout, often with concurrent operations on shared objects. Race conditions (CWE-362) arise when two threads or asynchronous operations access a shared resource (such as a media object, stream buffer, or DOM element) without proper synchronization — creating a time-of-check-to-time-of-use (TOCTOU) window where one thread frees or modifies an object while another still holds a reference to it. Successfully exploiting a race condition in Chrome's renderer requires precise timing but is achievable via JavaScript-controlled timing, and results in use-after-free or type confusion primitives equivalent in severity to directly triggered memory corruption.

Overview

CVE-2021-21166 is a race condition vulnerability (CWE-362) in Google Chrome that allows a remote attacker to exploit heap corruption via a crafted HTML page. Google patched this in Chrome 89.0.4389.72 (March 2, 2021), confirming that an exploit existed in the wild at time of patch. This was the second Chrome zero-day of Q1 2021 — following CVE-2021-21148 (V8 heap buffer overflow, February 4) and preceding CVE-2021-21193 (Blink UAF, March 12). The rapid clustering of Chrome zero-days in early 2021 reflected intense exploitation activity by sophisticated actors. CISA added CVE-2021-21166 to the KEV catalog in November 2021.

Affected Versions

Product Vulnerable Fixed
Chrome before 89.0.4389.72 Yes Chrome 89.0.4389.72 (March 2, 2021)
Microsoft Edge (Chromium) before equivalent Yes Edge update following Chrome 89
Opera and other Chromium-based browsers Yes Corresponding vendor updates

Technical Details

  • Root cause: Race condition (CWE-362) in Chrome's renderer — concurrent access to a shared Chrome object (in a media/stream component or similar area) without proper synchronization creates a window where one path frees the object while another path retains a reference, producing a use-after-free condition exploitable for heap corruption
  • Exploitation via timing: Race condition exploits use JavaScript to trigger the vulnerable concurrent execution path repeatedly until the race is won — modern JavaScript provides sufficient timing control (via Workers, Promises, or event callbacks) to make this reliable in practice
  • Heap corruption primitive: The resulting use-after-free gives the attacker controlled heap corruption — combined with heap grooming (spraying controlled objects to occupy the freed memory), this achieves type confusion and ultimately code execution in the Chrome renderer process
  • Renderer sandbox: Code execution occurs in Chrome's sandboxed renderer process; OS-level compromise requires a separate sandbox escape (not included in CVE-2021-21166); however renderer RCE enables significant data theft and is the first stage of full browser exploitation chains
  • Q1 2021 Chrome zero-day density: Three Chrome zero-days (21148, 21166, 21193) in approximately six weeks represents extraordinary exploitation tempo — consistent with multiple nation-state actors simultaneously deploying Chrome zero-days in targeted surveillance or espionage operations

Discovery

Reported to Google as an in-the-wild zero-day, credited to Alison Huffman of Microsoft Browser Vulnerability Research in the Chrome 89.0.4389.72 release notes. The discovery by a Microsoft researcher is notable — both companies were hunting for Chrome zero-days in active use. Google confirmed the exploit existed in the wild at time of the March 2, 2021 patch.

Exploitation Context

The high density of Chrome zero-days in Q1 2021 suggests several sophisticated threat actors — likely nation-state groups — were simultaneously holding and deploying Chrome exploits. CVE-2021-21166 was used in targeted attacks before the patch, exploiting the renderer via malicious web pages. Chrome zero-days at this tier are typically used in: (1) targeted surveillance against specific high-value individuals (journalists, activists, dissidents), (2) watering hole attacks against specific communities (security researchers, government employees), or (3) exploit kit delivery chains for criminal operations. The November 2021 CISA KEV addition — covering all three Q1 2021 Chrome zero-days — reflects continued exploitation of unpatched Chrome installations across enterprise environments.

Remediation

  1. Update Chrome to 89.0.4389.72 or later — any current Chrome release contains the fix; verify at chrome://settings/help
  2. Update Microsoft Edge, Opera, Brave, and all Chromium-based browsers separately — Chrome updates do not propagate to other Chromium-based browsers
  3. Enable automatic Chrome updates and verify no enterprise policy blocks update delivery (chrome://policy/ to check)
  4. Apply all three Q1 2021 Chrome security patches: CVE-2021-21148 (89.0.4389.72), CVE-2021-21166 (89.0.4389.72 — same release), and CVE-2021-21193 (89.0.4389.90)
  5. Enable Chrome's Enhanced Safe Browsing for additional protection against malicious web pages used to deliver browser exploits
  6. Ensure Chrome sandboxing is active — do not run Chrome with --no-sandbox, which removes the isolation that limits race condition exploit impact to the renderer process

Key Details

PropertyValue
CVE ID CVE-2021-21166
Vendor / Product Google — Chromium
NVD Published2021-03-09
NVD Last Modified2025-10-24
CVSS 3.1 Score8.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-362 find similar ↗
CISA KEV Added2021-11-03
CISA KEV Deadline2021-11-17
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2021-11-17. Apply updates per vendor instructions.

Timeline

DateEvent
2021-03-02Google releases Chrome 89.0.4389.72 patching CVE-2021-21166 — zero-day, 'exploit exists in the wild'
2021-03-09CVE published
2021-11-03Added to CISA Known Exploited Vulnerabilities catalog
2021-11-17CISA BOD 22-01 remediation deadline

References

ResourceType
Chrome Stable Channel Update — Chrome 89.0.4389.72 Vendor Advisory
NVD — CVE-2021-21166 Vulnerability Database
CISA KEV Catalog Entry US Government