Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-24213

CVE-2025-24213: Apple Safari Use-After-Free Vulnerability

CVE-2025-24213 is a use-after-free vulnerability in Apple Safari that causes type confusion leading to memory corruption. This article covers the technical details, affected versions, impact, and mitigation.

Updated:

CVE-2025-24213 Overview

CVE-2025-24213 is a type confusion vulnerability affecting Apple's WebKit-based products across multiple operating systems. The flaw stems from improper handling of floating-point values, which can lead to memory corruption when processing crafted web content. Apple addressed the issue with improved handling of floats in Safari 18.5, iOS 18.5, iPadOS 18.5, iPadOS 17.7.7, macOS Sequoia 15.5, tvOS 18.5, visionOS 2.5, and watchOS 11.5. The vulnerability is categorized under [CWE-843] (Access of Resource Using Incompatible Type) and requires user interaction to trigger, typically by visiting a malicious webpage.

Critical Impact

Successful exploitation can corrupt memory within the WebKit process, potentially enabling arbitrary code execution in the context of the browser.

Affected Products

  • Apple Safari (prior to 18.5)
  • Apple iOS and iPadOS (prior to 18.5; iPadOS 17.7.7 for legacy devices)
  • Apple macOS Sequoia (prior to 15.5), tvOS (prior to 18.5), visionOS (prior to 2.5), watchOS (prior to 11.5)

Discovery Timeline

  • 2025-03-31 - CVE-2025-24213 published to the National Vulnerability Database (NVD)
  • 2026-04-02 - Last updated in NVD database

Technical Details for CVE-2025-24213

Vulnerability Analysis

The vulnerability is a type confusion condition within WebKit, the browser engine that powers Safari and all third-party browsers on iOS. Type confusion occurs when code allocates or accesses a resource using one type but operates on it as if it were another. In this case, the issue centers on how floating-point values are handled within the engine. When the engine misinterprets the underlying representation of a float, subsequent memory operations can read or write outside the intended object boundaries, producing memory corruption.

Memory corruption in a just-in-time (JIT) compiled JavaScript environment is a well-known precursor to arbitrary code execution. Attackers commonly chain a type confusion primitive with heap shaping techniques to gain read/write access to controlled memory regions.

Root Cause

The root cause is insufficient validation of floating-point types during value handling in WebKit. Apple's advisory states the fix involves improved handling of floats, which indicates the original code path failed to maintain type integrity when transitioning between numeric representations. This is consistent with [CWE-843] type confusion weaknesses.

Attack Vector

Exploitation requires a target to visit a maliciously crafted webpage or load attacker-controlled web content within any WebKit-based application. The CVSS vector indicates user interaction is required, and the impact spans confidentiality, integrity, and availability. No authentication is needed. Once a victim renders the content, the type confusion can be triggered to corrupt memory inside the renderer process.

No verified public proof-of-concept code is available for this CVE. See the Apple Support Article #122722 for vendor technical details.

Detection Methods for CVE-2025-24213

Indicators of Compromise

  • Unexpected crashes or termination of Safari or WebKit-backed processes such as com.apple.WebKit.WebContent recorded in system crash logs.
  • Outbound network connections from browser processes to unfamiliar domains immediately after visiting unknown sites.
  • Spawning of shell or scripting processes (/bin/sh, osascript) as children of WebKit processes.

Detection Strategies

  • Inventory all Apple endpoints and compare installed OS and Safari versions against the patched baseline to identify vulnerable hosts.
  • Hunt for renderer-process crash signatures in ~/Library/Logs/DiagnosticReports/ that reference WebKit JavaScriptCore frames.
  • Correlate browser process anomalies with web proxy logs to identify users who visited suspicious domains around the time of the crash.

Monitoring Recommendations

  • Monitor child-process creation by Safari and WebKit.WebContent and alert on uncommon descendants.
  • Track Safari and OS version drift across the fleet using mobile device management (MDM) reporting.
  • Review egress traffic from browser processes for connections to newly registered or low-reputation domains.

How to Mitigate CVE-2025-24213

Immediate Actions Required

  • Update all Apple devices to Safari 18.5, iOS 18.5, iPadOS 18.5 (or 17.7.7 for legacy iPadOS), macOS Sequoia 15.5, tvOS 18.5, visionOS 2.5, or watchOS 11.5.
  • Enforce patch deployment through MDM policies and verify compliance reporting before closing the ticket.
  • Restrict browsing to trusted sites on unpatched endpoints until updates are applied.

Patch Information

Apple has released patches across its product lines. Refer to the official advisories: Apple Support Article #122404, Apple Support Article #122405, Apple Support Article #122716, Apple Support Article #122719, Apple Support Article #122720, Apple Support Article #122721, and Apple Support Article #122722. Debian users should consult the Debian LTS Announcement for WebKitGTK updates.

Workarounds

  • Disable JavaScript in Safari for high-risk users via Settings > Safari > Advanced until patches are deployed.
  • Use Lockdown Mode on iOS, iPadOS, and macOS for high-value targets to reduce the WebKit attack surface.
  • Apply web filtering at the network egress layer to block known malicious domains hosting WebKit exploits.
bash
# Verify Safari version on macOS
defaults read /Applications/Safari.app/Contents/Info.plist CFBundleShortVersionString

# Verify macOS build version
sw_vers -productVersion

# Trigger software update check
sudo softwareupdate --install --all --restart

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.