The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-40785

CVE-2024-40785: Apple iPhone OS XSS Vulnerability

CVE-2024-40785 is a cross-site scripting flaw in Apple iPhone OS that occurs when processing malicious web content. This article covers technical details, affected versions across iOS, Safari, and macOS, and mitigation.

Updated: January 22, 2026

CVE-2024-40785 Overview

CVE-2024-40785 is a Cross-Site Scripting (XSS) vulnerability affecting Apple's WebKit browser engine across multiple Apple platforms. The vulnerability exists due to insufficient input validation when processing web content. An attacker can craft malicious web content that, when processed by an affected application, executes arbitrary scripts in the context of a victim's browsing session.

This vulnerability affects a wide range of Apple products including iOS, iPadOS, Safari, watchOS, tvOS, visionOS, and macOS Sonoma. Apple addressed this issue with improved checks in multiple security updates released in July 2024.

Critical Impact

Processing maliciously crafted web content may lead to a cross-site scripting attack, potentially allowing attackers to steal sensitive information, hijack user sessions, or perform actions on behalf of users.

Affected Products

  • Apple iOS (versions prior to 16.7.9 and 17.6)
  • Apple iPadOS (versions prior to 16.7.9 and 17.6)
  • Apple Safari (versions prior to 17.6)
  • Apple watchOS (versions prior to 10.6)
  • Apple tvOS (versions prior to 17.6)
  • Apple visionOS (versions prior to 1.3)
  • Apple macOS Sonoma (versions prior to 14.6)

Discovery Timeline

  • July 29, 2024 - CVE-2024-40785 published to NVD
  • November 4, 2025 - Last updated in NVD database

Technical Details for CVE-2024-40785

Vulnerability Analysis

CVE-2024-40785 is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting. The vulnerability resides in Apple's WebKit engine, which is the core rendering engine used by Safari and other Apple applications that display web content.

The flaw stems from inadequate validation checks when the WebKit engine processes certain types of web content. When a user visits a malicious webpage or processes attacker-controlled web content, the vulnerability allows for the execution of arbitrary JavaScript in the security context of the target origin. This can enable attackers to access cookies, session tokens, and other sensitive data stored in the browser, as well as perform actions impersonating the victim user.

The network-based attack vector requires user interaction, as the victim must navigate to or be redirected to malicious content. The vulnerability has a changed scope, meaning successful exploitation can impact resources beyond the vulnerable component's security scope.

Root Cause

The root cause of CVE-2024-40785 lies in insufficient input validation within WebKit's content processing routines. When handling specific web content structures, WebKit failed to properly sanitize or escape user-controlled input before rendering it in the browser context. This oversight allows attackers to inject malicious scripts that execute when the content is processed.

Apple addressed this vulnerability by implementing improved checks in the content processing pipeline, ensuring that potentially dangerous input is properly validated and neutralized before being rendered.

Attack Vector

The attack vector for CVE-2024-40785 is network-based and requires user interaction. An attacker would typically:

  1. Craft malicious web content containing XSS payloads
  2. Host this content on a malicious website or inject it into a legitimate site through other means
  3. Lure the victim to visit the malicious page through phishing, social engineering, or malicious advertisements
  4. When the victim's browser renders the content, the malicious scripts execute in the context of the vulnerable application

The attack does not require any privileges and can be executed against any user visiting the malicious content. Due to the changed scope characteristic, the attack can potentially affect cross-origin resources, making session hijacking and credential theft possible.

Detection Methods for CVE-2024-40785

Indicators of Compromise

  • Unexpected JavaScript execution or browser behavior when visiting websites
  • Suspicious network requests to unknown domains initiated by the browser
  • Unusual cookie modifications or session token exfiltration attempts
  • Browser console errors indicating script injection attempts

Detection Strategies

  • Monitor web traffic for suspicious JavaScript payloads in HTTP responses
  • Implement Content Security Policy (CSP) headers and monitor for violations
  • Use browser-based XSS auditors and web application firewalls to detect injection attempts
  • Review application logs for unusual cross-origin requests

Monitoring Recommendations

  • Enable and monitor CSP violation reports for attempted script injections
  • Implement network-level monitoring for connections to known malicious domains
  • Deploy endpoint detection solutions capable of identifying WebKit exploitation attempts
  • Regularly audit browser extensions and plugins that may interact with web content

How to Mitigate CVE-2024-40785

Immediate Actions Required

  • Update all Apple devices to the latest patched versions immediately
  • Ensure automatic updates are enabled for iOS, iPadOS, macOS, watchOS, tvOS, and visionOS
  • Instruct users to avoid clicking links from untrusted sources until patches are applied
  • Review and restrict access to sensitive web applications from unpatched devices

Patch Information

Apple has released security updates addressing CVE-2024-40785 across all affected platforms. Users and administrators should update to the following versions or later:

ProductFixed VersionAdvisory
iOS16.7.9 / 17.6HT214116, HT214117
iPadOS16.7.9 / 17.6HT214116, HT214117
Safari17.6HT214121
watchOS10.6HT214124
tvOS17.6HT214122
visionOS1.3HT214123
macOS Sonoma14.6HT214119

Debian has also released updates for WebKitGTK addressing this vulnerability. See the Debian LTS Announcement for details.

Workarounds

  • Implement strict Content Security Policy (CSP) headers on web applications to mitigate XSS impact
  • Use browser isolation technologies to contain potential exploits
  • Restrict JavaScript execution on sensitive sites using browser extensions until patches are applied
  • Deploy web application firewalls with XSS detection rules at the network perimeter
bash
# Example CSP header configuration for Apache
# Add to httpd.conf or .htaccess
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self';"

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

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechApple Iphone Os

  • SeverityMEDIUM

  • CVSS Score6.1

  • EPSS Probability0.64%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • Full Disclosure Announcement July 15

  • Full Disclosure Announcement July 16

  • Full Disclosure Announcement July 17

  • Full Disclosure Announcement July 18

  • Full Disclosure Announcement July 21

  • Full Disclosure Announcement July 22

  • Full Disclosure Announcement July 23

  • Debian LTS Announcement September 2024

  • Apple Knowledge Base HT214116

  • Apple Knowledge Base HT214117

  • Apple Knowledge Base HT214119

  • Apple Knowledge Base HT214122

  • Apple Knowledge Base HT214124
  • Vendor Resources
  • Apple Support Article HT214116

  • Apple Support Article HT214117

  • Apple Support Article HT214119

  • Apple Support Article HT214121

  • Apple Support Article HT214122

  • Apple Support Article HT214123

  • Apple Support Article HT214124
  • Related CVEs
  • CVE-2021-30761: Apple iPhone OS RCE Vulnerability

  • CVE-2021-30762: Apple iPhone OS Use After Free Vulnerability

  • CVE-2021-30666: Apple iPhone OS RCE Vulnerability

  • CVE-2021-30799: Apple iPhone OS RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English