Skip to main content
CVE Vulnerability Database

CVE-2024-5847: Google Chrome PDFium Use After Free Flaw

CVE-2024-5847 is a use after free vulnerability in Google Chrome's PDFium component that enables remote attackers to exploit heap corruption through malicious PDF files. This article covers technical details, affected versions, and patches.

Published:

CVE-2024-5847 Overview

CVE-2024-5847 is a use-after-free vulnerability [CWE-416] in PDFium, the PDF rendering engine bundled with Google Chrome. The flaw affects Chrome versions prior to 126.0.6478.54 and allows a remote attacker to trigger heap corruption by serving a crafted PDF file. Successful exploitation requires the victim to open or render the malicious document, after which the attacker can potentially achieve arbitrary code execution within the renderer process.

The vulnerability also affects downstream Chromium-based distributions, including Fedora 39 and Fedora 40 packages of Chromium.

Critical Impact

A remote attacker who convinces a user to render a crafted PDF can corrupt heap memory in PDFium and gain code execution within the Chrome renderer sandbox.

Affected Products

  • Google Chrome versions prior to 126.0.6478.54
  • Fedora 39 (Chromium package)
  • Fedora 40 (Chromium package)

Discovery Timeline

  • 2024-06-11 - CVE-2024-5847 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2024-5847

Vulnerability Analysis

The vulnerability resides in PDFium, the open-source PDF library that Chrome uses to parse and render PDF documents. PDFium handles complex object lifetimes across parsing, layout, JavaScript execution, and rendering pipelines. A use-after-free condition occurs when code references a heap object after that object has been freed.

Attackers can groom the heap to place attacker-controlled data in the freed allocation. When the dangling pointer is dereferenced, the attacker influences control flow or data flow inside the renderer process. PDFium runs inside Chrome's renderer sandbox, so the immediate impact is renderer compromise. Attackers typically chain this primitive with a sandbox escape to achieve full system compromise.

Root Cause

The root cause is improper object lifetime management within PDFium [CWE-416]. A reference to a heap-allocated structure persists after the structure is released, producing a dangling pointer. Subsequent operations dereference that pointer, treating freed memory as a valid object. Public technical details remain limited because the Chromium issue tracker entry 341313077 is restricted while users update.

Attack Vector

Exploitation is network-based and requires user interaction. The attacker delivers a crafted PDF through a web page, email attachment, or embedded <iframe>. When Chrome loads the PDF using PDFium, parsing of malformed objects triggers the use-after-free. No authentication is required, and the attacker controls the document contents end to end.

No public proof-of-concept code or working exploit is currently documented in ExploitDB or the referenced advisories. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.

Detection Methods for CVE-2024-5847

Indicators of Compromise

  • Chrome renderer process crashes (chrome.exe --type=renderer) correlated with PDF rendering activity
  • Unexpected child processes spawned from Chrome renderer processes after a user opens a PDF
  • Outbound network connections from Chrome processes to unfamiliar hosts shortly after PDF download events
  • PDF files containing malformed object streams or unusual JavaScript actions delivered via email or web downloads

Detection Strategies

  • Inventory installed Chrome versions across the fleet and flag any build below 126.0.6478.54
  • Monitor endpoint telemetry for renderer crashes with exception codes indicating heap corruption (STATUS_HEAP_CORRUPTION, EXCEPTION_ACCESS_VIOLATION)
  • Inspect PDF attachments at the email gateway for embedded JavaScript and structurally anomalous object trees
  • Hunt for post-exploitation behaviors such as Chrome spawning cmd.exe, powershell.exe, or writing executables to user-writable paths

Monitoring Recommendations

  • Forward Chrome process telemetry, including crash dumps and child-process creation events, to a centralized analytics platform
  • Track browser version compliance through endpoint management tooling and alert on drift
  • Correlate PDF download events with subsequent process and network activity from the rendering host

How to Mitigate CVE-2024-5847

Immediate Actions Required

  • Update Google Chrome to version 126.0.6478.54 or later on all managed endpoints
  • Update Fedora 39 and Fedora 40 Chromium packages using dnf update chromium
  • Restart Chrome after patching to ensure the vulnerable PDFium library is unloaded from memory
  • Audit endpoint inventory to confirm no instances of pre-126 Chrome remain in the environment

Patch Information

Google released the fix in the Stable channel update for desktop, shipping Chrome 126.0.6478.54 for Windows, macOS, and Linux. Fedora published corresponding Chromium updates for Fedora 39 and Fedora 40 through the Fedora package announcement mailing list. See the Google Chrome Desktop Update and Chromium Issue Tracker Entry for vendor details.

Workarounds

  • Disable Chrome's built-in PDF viewer by setting AlwaysOpenPdfExternally to true via enterprise policy until patching completes
  • Block PDF attachments from untrusted senders at the email gateway
  • Restrict outbound browsing to known-good sites using web filtering while the rollout is in progress
bash
# Configuration example: enforce Chrome auto-update and disable built-in PDF viewer via Group Policy on Windows
reg add "HKLM\Software\Policies\Google\Chrome" /v AlwaysOpenPdfExternally /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Google\Update" /v UpdateDefault /t REG_DWORD /d 1 /f

# Linux (Fedora) - update Chromium package
sudo dnf update -y chromium

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.