Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-7524 Overview
CVE-2024-7524 is a cross-site scripting (XSS) vulnerability in Mozilla Firefox and Firefox ESR affecting the browser's Enhanced Tracking Protection (ETP) feature. Firefox replaces certain blocked tracking scripts with web-compatibility shims to prevent site breakage. On websites protected by a Content Security Policy (CSP) in strict-dynamic mode, an attacker who could inject an HTML element was able to perform a DOM Clobbering attack against these shims. The attack bypassed the CSP strict-dynamic protection and achieved script execution in the victim site's context. The flaw is tracked under [CWE-79] (Improper Neutralization of Input During Web Page Generation).
Critical Impact
An attacker able to inject a benign HTML element into a CSP-protected page can escalate the primitive into full XSS, defeating a defense specifically designed to stop script injection.
Affected Products
- Mozilla Firefox versions prior to 129
- Mozilla Firefox ESR versions prior to 115.14
- Mozilla Firefox ESR versions prior to 128.1
Discovery Timeline
- 2024-08-06 - CVE-2024-7524 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-7524
Vulnerability Analysis
Firefox ships web-compatibility shims that stand in for third-party tracking scripts blocked by Enhanced Tracking Protection. These shims expose JavaScript objects and functions that mimic the blocked trackers so dependent sites continue to function. Because the shims are injected by the browser into the page context, they are treated as trusted script under CSP strict-dynamic.
The strict-dynamic CSP source expression grants execution privilege to scripts dynamically loaded by other trusted scripts. By chaining through a trusted shim, an attacker can smuggle attacker-controlled behavior into a privileged execution path. The result is script execution on an origin that explicitly deployed CSP to prevent it.
Root Cause
The shim code looked up configuration or callback values from the DOM without validating that those references pointed to legitimate JavaScript objects. DOM Clobbering abuses the fact that named HTML elements (id or name attributes) become accessible as properties on the document and window objects. An injected <a>, <form>, or <img> element with a chosen id can override expected properties referenced by the shim.
Attack Vector
Exploitation requires an HTML injection sink on a target origin that enforces CSP strict-dynamic and relies on a Firefox tracking-protection shim. The attacker injects a non-script HTML element whose id or name clobbers a property read by the shim. When the shim subsequently dereferences the clobbered property, it executes attacker-controlled code within the page origin, bypassing the CSP boundary. User interaction with the compromised page is required, consistent with reflected or stored XSS workflows. Full technical analysis is available in Mozilla Bug 1909241 and Mozilla Security Advisory MFSA-2024-33.
Detection Methods for CVE-2024-7524
Indicators of Compromise
- Unexpected script execution reported through CSP violation reports on origins that enforce strict-dynamic, especially those referencing shim-provided globals.
- HTML content containing elements with suspicious id or name attributes matching known tracker SDK symbol names (for example, Google Analytics, Facebook Pixel, or Criteo globals).
- Outbound requests from end-user Firefox installations to attacker-controlled domains following interaction with a vulnerable page.
Detection Strategies
- Inventory browser versions across the fleet and flag any Firefox build below 129 or Firefox ESR below 115.14 and 128.1.
- Review CSP violation report endpoints for anomalies on sites that use strict-dynamic, since successful bypasses may suppress expected violations.
- Audit user-generated HTML sanitizers to confirm id and name attributes are stripped or namespaced before storage or reflection.
Monitoring Recommendations
- Centralize browser-version telemetry from endpoint management tooling and alert on unpatched Firefox installations.
- Monitor web application logs for HTML inputs that include tag attributes carrying tracker-adjacent identifier strings.
- Track Mozilla's advisory channel for related shim-based regressions and incorporate updates into vulnerability management SLAs.
How to Mitigate CVE-2024-7524
Immediate Actions Required
- Upgrade Firefox to version 129 or later on all managed endpoints.
- Upgrade Firefox ESR deployments to 115.14 or 128.1, matching the ESR channel in use.
- Prioritize endpoints that frequently access web applications hosting user-generated HTML content.
Patch Information
Mozilla addressed CVE-2024-7524 in Firefox 129, Firefox ESR 115.14, and Firefox ESR 128.1. Patch details and affected modules are documented in Mozilla Security Advisory MFSA-2024-33, Mozilla Security Advisory MFSA-2024-34, and Mozilla Security Advisory MFSA-2024-35. Enterprise administrators should distribute the updated MSI, PKG, or Linux packages through standard software distribution channels.
Workarounds
- Server-side, strip or namespace id and name attributes from user-supplied HTML to neutralize DOM Clobbering primitives.
- Avoid relying solely on CSP strict-dynamic as a last line of defense; combine it with Trusted Types where feasible.
- Consider disabling Enhanced Tracking Protection shims via enterprise policy only as a temporary measure, since this may break legitimate site functionality.
# Example Firefox enterprise policy (policies.json) to enforce auto-updates
{
"policies": {
"AppAutoUpdate": true,
"DisableAppUpdate": false,
"OverrideFirstRunPage": "",
"ExtensionUpdate": true
}
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

