CVE DatabaseCVE-2021-30661
한국어 권고문 →
CVE-2021-306618.8/HIGHCISA KEVCWE-416CWE-416

Apple WebKit Use-After-Free Vulnerability Leading to Remote Code Execution (CVE-2021-30661)

⚡ Jump to Patch
Affected Vendors
apple
Affected Components
safari, ios, ipados, watchos, tvos, macos
Published Date
2021-09-08
CVSS v3.1
8.8
HIGH
EPSS (30d)
4.5%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Systems running Safari prior to 14.1, iOS prior to 12.5.3, iOS/iPadOS prior to 14.5, watchOS prior to 7.4, tvOS prior to 14.5, and macOS Big Sur prior to 11.3

Impact

Processing maliciously crafted web content may trigger a Use-After-Free vulnerability in the WebKit rendering engine, allowing remote attackers to execute arbitrary code on the target device. Active exploitation in the wild has been reported

Mitigation

Immediately apply the official security updates provided by Apple to upgrade to patched versions

Affected Products & Version Scope

Safari versions prior to 14.1, iOS versions prior to 12.5.3, iOS 14.5 and iPadOS 14.5 versions prior to 14.5, watchOS versions prior to 7.4, tvOS versions prior to 14.5, and macOS Big Sur versions prior to 11.3

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

To mitigate this vulnerability, immediately update your Apple operating systems and Safari browser to the latest patched versions.

On macOS, you can check for and apply pending security updates via the terminal:

bash
# List all available software updates
softwareupdate -l

# Force install all critical security updates and restart the system
sudo softwareupdate -iaR

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, restrict access to untrusted external websites and enforce strict web filtering policies via MDM or proxy configurations.

You can block outbound traffic from unpatched devices at the network perimeter or proxy level using rules similar to the following Squid configuration:

bash
# Example proxy ACL to restrict web access for unpatched subnets
acl Unpatched_Subnet src 10.10.40.0/24
http_access deny Unpatched_Subnet

3. Log Audit & IoC Verification Commands

Use the following shell script on macOS endpoints to audit the current OS and Safari versions to identify vulnerable assets:

bash
#!/bin/bash
echo '[+] Auditing system for CVE-2021-30661 vulnerability...'

# Retrieve macOS version
os_ver=$(sw_vers -productVersion)
echo "[-] macOS Version: $os_ver"

# Retrieve Safari version
if [ -d '/Applications/Safari.app' ]; then
  safari_ver=$(defaults read /Applications/Safari.app/Contents/Info.plist CFBundleShortVersionString)
  echo "[-] Safari Version: $safari_ver"
else
  echo '[!] Safari app not found in default path.'
fi

# Simple version check
if [[ '$os_ver' < '11.3' ]]; then
  echo '[WARNING] This endpoint is vulnerable. Immediate update required.'
else
  echo '[OK] Endpoint is running a patched or newer version.'
fi
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2021-30661) is a critical Use-After-Free (UAF) memory corruption flaw residing within Apple's WebKit rendering engine. The root cause stems from improper memory management during the lifecycle handling of specific DOM or rendering objects. When the engine fails to clear pointers to objects that have already been deallocated from memory, it creates a dangling pointer condition. Subsequent attempts to access or manipulate this freed memory space allow attackers to corrupt memory structures.

2. Exploitation Mechanics & Attack Scenario

An attacker exploits this vulnerability by hosting a specially crafted web page containing malicious HTML, JavaScript, or CSS. When a victim visits the malicious site using Safari or any application utilizing the WebKit framework, the engine processes the crafted elements, triggering premature object deallocation. The attacker then utilizes heap grooming techniques to populate the newly freed memory slot with controlled payloads. When WebKit attempts to reuse the dangling pointer, execution flow is redirected to the attacker's shellcode, achieving arbitrary code execution within the context of the sandboxed renderer process.

3. Infrastructure & Business Impact

As this vulnerability is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, it represents a highly reliable and actively exploited vector. In an enterprise environment, unpatched macOS and iOS devices pose a severe risk of initial compromise. Successful exploitation can lead to complete device takeover, credential theft, session hijacking, and lateral movement within the corporate network, potentially resulting in catastrophic data breaches and operational disruption.

Official Vendor Advisories & References

NVD Original English Description

A use after free issue was addressed with improved memory management. This issue is fixed in Safari 14.1, iOS 12.5.3, iOS 14.5 and iPadOS 14.5, watchOS 7.4, tvOS 14.5, macOS Big Sur 11.3. Processing maliciously crafted web content may lead to arbitrary code execution. Apple is aware of a report that this issue may have been actively exploited..

Frequently Asked SecOps Questions (CVE-2021-30661)

FAQ

Q1. How critical is CVE-2021-30661 and is it actively exploited in the wild?

CVE-2021-30661 is rated CVSS 8.8 (HIGH) with a 30-day EPSS exploitation probability of 4.5%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-30661?

Primary impacted vendors include apple across safari, ios, ipados, watchos, tvos, macos. Scope summary: Safari versions prior to 14.1, iOS versions prior to 12.5.3, iOS 14.5 and iPadOS 14.5 versions prior to 14.5, watchOS versions prior to 7.4, tvOS versions prior to 14.5, and macOS Big Sur versions prior to 11.3

Q3. What temporary mitigations or workarounds exist for CVE-2021-30661 before patching?

[Mitigation] Immediately apply the official security updates provided by Apple to upgrade to patched versions Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-30661

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (apple)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-30661 Apple WebKit Use-After-Free Vulnerability Leading to Remote Code Execution (CVE-2021-30661) (CVSS 8.8) - Patch & Workaround | CVE Pulse