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

Apple iOS WebKit Use-After-Free Vulnerability (CVE-2021-30762) Technical Advisory

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

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Legacy Apple devices running iOS versions prior to 12.5.4 (including iPhone 5s, iPhone 6, iPad Air, iPad mini 2/3, and iPod touch 6th gen)

Impact

Processing maliciously crafted web content may trigger a Use-After-Free condition, leading to arbitrary code execution (RCE) and potential device compromise

Mitigation

Immediately update affected legacy iOS devices to version 12.5.4 or later, and restrict access to untrusted web links

Affected Products & Version Scope

Legacy Apple devices running iOS versions prior to 12.5.4

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Users must immediately update their legacy iOS devices to version 12.5.4 or later via Over-The-Air (OTA) updates or iTunes/Finder.

bash
# On-device update path:
# Settings -> General -> Software Update -> Download and Install iOS 12.5.4 or later

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, enforce MDM policies to restrict access to untrusted external websites and block vulnerable User-Agents at the reverse proxy level.

nginx
# Nginx configuration to block vulnerable legacy iOS User-Agents
map $http_user_agent $block_legacy_ios {
    default 0;
    ~*"iPhone OS 12_[0-5]" 1;
    ~*"iPad; CPU OS 12_[0-5]" 1;
}

server {
    listen 443 ssl;
    if ($block_legacy_ios) {
        return 403 'Access Denied: Please update your iOS device to 12.5.4+ to access corporate resources.';
    }
}

3. Log Audit & IoC Verification Commands

Use the following Python script to parse web server access logs and identify vulnerable legacy iOS devices connecting to your network infrastructure.

python
# Python script to audit web server logs for vulnerable iOS versions
import re

ua_pattern = re.compile(r'"(Mozilla/.*?iPhone OS (\d+)_(\d+)_?(\d+)?.*?)"')

with open('access.log', 'r') as log_file:
    for line in log_file:
        match = ua_pattern.search(line)
        if match:
            full_ua = match.group(1)
            major = int(match.group(2))
            minor = int(match.group(3))
            patch = int(match.group(4)) if match.group(4) else 0
            
            # Detect iOS versions below 12.5.4
            if major < 12 or (major == 12 and (minor < 5 or (minor == 5 and patch < 4))):
                print(f'[ALERT] Vulnerable iOS Client Detected: {full_ua}')
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation in the wild, immediately update all legacy iOS devices to version 12.5.4 or higher.

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-30762) is a critical Use-After-Free (UAF) memory corruption flaw residing within the WebKit rendering engine of Apple iOS. The root cause lies in improper memory management when handling dynamic DOM elements or JavaScript objects. When WebKit fails to clear or nullify pointers to memory locations that have already been deallocated, an attacker can manipulate the heap layout to reuse these dangling pointers, leading to memory corruption.

2. Exploitation Mechanics & Attack Scenario

An attacker exploits this vulnerability by hosting a specially crafted web page containing malicious HTML/JavaScript. When a vulnerable iOS device visits the site via Safari or an embedded WebKit view, the script triggers the premature deallocation of a specific object and fills the freed memory slot with attacker-controlled shellcode. When WebKit subsequently attempts to access the freed object, it executes the attacker's payload instead, achieving arbitrary code execution under the context of the WebKit process.

3. Infrastructure & Business Impact

As this vulnerability is actively exploited in the wild and listed in the CISA KEV catalog, it poses a severe threat to enterprise environments. Successful exploitation allows remote attackers to compromise mobile endpoints, bypass sandbox boundaries when chained with local privilege escalation exploits, and gain unauthorized access to corporate networks, sensitive credentials, and internal communications.

Official Vendor Advisories & References

NVD Original English Description

A use after free issue was addressed with improved memory management. This issue is fixed in iOS 12.5.4. 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-30762)

FAQ

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

CVE-2021-30762 is rated CVSS 8.8 (HIGH) with a 30-day EPSS exploitation probability of 11.0%. 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-30762?

Primary impacted vendors include apple across ios, safari, webkit. Scope summary: Legacy Apple devices running iOS versions prior to 12.5.4

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

[Mitigation] Immediately update affected legacy iOS devices to version 12.5.4 or later, and restrict access to untrusted web links 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-30762

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-30762 Apple iOS WebKit Use-After-Free Vulnerability (CVE-2021-30762) Technical Advisory (CVSS 8.8) - Patch & Workaround | CVE Pulse