Skip to main content

CVE-2024-0747: Mozilla Firefox CSP Override Vulnerability

CVE-2024-0747 is a Content Security Policy bypass flaw in Mozilla Firefox that allows parent pages to override child iframe CSP rules when using unsafe-inline. This article covers technical details, affected versions, and updates.

Published:

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-0747 Overview

CVE-2024-0747 is a Content Security Policy (CSP) enforcement flaw in Mozilla Firefox, Firefox ESR, and Thunderbird. When a parent page loaded a child document inside an iframe with the unsafe-inline directive, the parent CSP could override the child's CSP. This weakened the isolation that CSP is intended to provide between embedded contexts and could allow script execution that the child document explicitly disallowed.

The issue is categorized under [CWE-693] Protection Mechanism Failure. It affects Firefox versions prior to 122, Firefox ESR prior to 115.7, and Thunderbird prior to 115.7. Debian also shipped updates through its LTS channel.

Critical Impact

An embedded document's Content Security Policy could be overridden by its parent, enabling execution of inline script in contexts the child explicitly intended to restrict.

Affected Products

  • Mozilla Firefox versions earlier than 122
  • Mozilla Firefox ESR versions earlier than 115.7
  • Mozilla Thunderbird versions earlier than 115.7 and Debian Linux distributions receiving upstream Mozilla packages

Discovery Timeline

  • 2024-01-23 - CVE-2024-0747 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-0747

Vulnerability Analysis

Content Security Policy is a browser-enforced defense that restricts which resources a document can load and whether inline script may execute. Each document is expected to enforce its own policy independently, including documents loaded inside an iframe.

In affected Mozilla products, the browser mishandled CSP inheritance between a parent frame and an embedded child frame. When the parent document's CSP permitted unsafe-inline, that permission could effectively override a stricter policy declared by the child document. The child's intended restriction on inline script was not reliably enforced in that nested loading path.

The practical consequence is a loss of script-execution isolation between composed web contexts. A page that correctly declared script-src 'self' could nonetheless end up running inline script because of the parent's weaker policy, undermining defenses against cross-site scripting and injected content.

Root Cause

The root cause is a protection mechanism failure in the CSP propagation logic for iframe loads. Rather than enforcing the child document's declared policy in isolation, the browser merged or substituted directives from the parent in a way that allowed unsafe-inline to take precedence. See Mozilla Bug Report #1764343 for the upstream analysis.

Attack Vector

Exploitation requires user interaction, typically visiting an attacker-controlled or attacker-influenced page that embeds a target document in an iframe. The attacker-controlled parent declares a permissive CSP containing unsafe-inline, then loads a victim resource whose own CSP would normally forbid inline scripts. The parent policy then overrides the child, allowing injected inline script to execute within the child's context. No authentication is required, and the attack is delivered over the network.

No public proof-of-concept or exploit code has been published for this issue.

Detection Methods for CVE-2024-0747

Indicators of Compromise

  • Browser telemetry showing Firefox, Firefox ESR, or Thunderbird client versions below the fixed releases (Firefox < 122, Firefox ESR < 115.7, Thunderbird < 115.7)
  • Web application logs showing unexpected inline script execution within frames whose server-sent CSP headers forbid unsafe-inline
  • CSP violation reports that stop arriving from embedded frames despite inline event handlers or <script> content being present

Detection Strategies

  • Inventory endpoint browser and mail client versions and flag any instances below the fixed Mozilla builds
  • Enable CSP report-to or report-uri endpoints on sensitive applications and alert on anomalies in reports originating from embedded contexts
  • Correlate browser version data with web traffic to third-party sites that embed first-party content via iframe

Monitoring Recommendations

How to Mitigate CVE-2024-0747

Immediate Actions Required

  • Upgrade Firefox to version 122 or later on all managed endpoints
  • Upgrade Firefox ESR to 115.7 or later where ESR is the standard channel
  • Upgrade Thunderbird to 115.7 or later and apply vendor packages on Debian systems
  • Prioritize deployments for users who browse untrusted content or operate in high-exposure roles

Patch Information

Mozilla addressed the issue in Firefox 122, Firefox ESR 115.7, and Thunderbird 115.7. Fixes are described in MFSA-2024-01, MFSA-2024-02, and MFSA-2024-04. Debian provides updated packages through its LTS security channel.

Workarounds

  • No supported configuration workaround removes the flaw; patching is required
  • Where immediate patching is not possible, restrict browser use for untrusted sites and disable third-party iframe content via enterprise policy
  • Application owners should avoid relying on unsafe-inline in parent documents and should serve CSP via HTTP response headers rather than <meta> tags for stronger enforcement
bash
# Verify installed Mozilla client versions on Debian-based hosts
firefox-esr --version
thunderbird --version
apt-get update && apt-get install --only-upgrade firefox-esr thunderbird

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.