Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2016-4657: WebKit Memory Corruption RCE in Apple iOS

Published Aug 25, 2016 · Updated today
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS69.0%100th percentile
CISA KEVYesAdded May 24, 2022
In the wildActivePer CISA KEV
Vendor
Apple
IdentifiersCVE-2016-4657CWE-119

CVE-2016-4657 is a memory-corruption vulnerability in WebKit affecting Apple iOS versions before 9.3.5. Processing a crafted website can allow remote attackers to execute arbitrary code within the Safari browser context or cause a denial of service. It was exploited as the initial stage of Trident, a three-vulnerability chain used to install NSO Group's Pegasus spyware. The subsequent stages exploited CVE-2016-4655 for kernel information disclosure and CVE-2016-4656 for kernel-level code execution.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can compromise the Safari execution context or crash the affected browser through memory corruption. When combined with the other Trident vulnerabilities, it enabled remote jailbreaking and spyware installation, supporting access to communications, credentials, location information, camera, and microphone. Those device-wide surveillance capabilities depended on the complete exploit chain and payload, not CVE-2016-4657 alone.

Mitigation

If you can’t patch tonight, do this now.

Until patched, avoid opening unsolicited links and restrict access to untrusted web content on affected devices. The observed exploitation used SMS links to malicious websites, so filtering suspicious messages and web destinations can reduce exposure but does not correct the underlying vulnerability.

Remediation

Patch, then assume compromise.

Upgrade affected devices to iOS 9.3.5 or a later supported release containing the fix. Devices that cannot receive a fixed release should be retired from sensitive use.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
webkit_trident.rbThis repository contains a single Metasploit module (modules/exploits/apple_ios/browser/webkit_trident.rb) that exploits a use-after-free (UAF) vulnerability in WebKit's JavaScriptCore library, as used in Apple iOS. The exploit targets CVE-2016-4655, CVE-2016-4656, and CVE-2016-4657, which were part of the 'Trident' exploit chain used by the Pegasus spyware. The module sets up an HTTP server that serves a malicious web page containing JavaScript to trigger the vulnerability in the target's browser. Depending on the requested URI, the server delivers different binaries (loader32, loader64, exploit64, payload32) to facilitate exploitation and payload delivery. The default payload is a Meterpreter reverse TCP shell for iOS (aarch64), providing the attacker with remote access to the device. The module is weaponized, allowing for customizable payloads and is suitable for operational use. The main attack vector is via a browser on a vulnerable iOS device visiting the attacker's server. The code is written in Ruby (Metasploit module) and includes embedded JavaScript for the browser exploit.Disclosed Aug 25, 2016 · Framework: metasploit · ruby · javascript · browser · networkWeaponizedSwitcherooThis repository is a proof-of-concept (PoC) exploit for CVE-2016-4657, a WebKit vulnerability, targeting the Nintendo Switch's browser. The structure includes a minimal custom browser written in C++ (main.cpp) for Debian Linux, which simulates the Nintendo Switch user agent and loads an online exploit page. The main exploit logic is implemented in JavaScript (exploit/jailbreak.js) and is loaded via an HTML page (exploit/index.html). The exploit attempts to trigger a memory corruption bug in WebKit, resulting in a browser crash on the Nintendo Switch. The repository is intended for academic purposes and does not provide a persistent jailbreak or code execution, but demonstrates the feasibility of exploiting the vulnerability. The codebase includes supporting files for logging (exploit/logger.js) and styling (exploit/style.css). The only network endpoint directly targeted is the hosted exploit page (https://idan5x.github.io/Switcheroo/), which is loaded by the custom browser.iDaN5x · Disclosed Jun 2, 2017 · cpp · javascript · browserPoCwebkit-vulnerabilityThis repository contains a proof-of-concept (PoC) exploit for CVE-2016-4657, a memory corruption vulnerability in the WebKit JavaScript engine affecting iOS 9.3 and the Nintendo Switch captive portal browser. The main exploit is implemented in 'attack.html', which uses advanced JavaScript techniques to manipulate memory and trigger the vulnerability. The exploit is designed to be run in a browser environment, specifically targeting the Nintendo Switch's captive portal (which uses a WebKit-based browser) or vulnerable versions of iOS Safari. The 'index.html' file serves as a landing page that detects the Nintendo Switch user agent and redirects to the exploit. The 'README.md' provides a brief overview and references a technical article for further reading. The 'tuto.md' is a detailed technical write-up on JavaScript engine exploitation, not directly part of the exploit but useful for understanding the context. The exploit demonstrates the vulnerability by corrupting array lengths and alerting the user, and may cause the browser to crash, showing exploitability. No weaponized payload is included; this is a research PoC.viai957 · Disclosed Nov 11, 2018 · javascript · html · browserPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AppleIphone Osoperating_system
FAQ

Frequently asked questions

Is CVE-2016-4657 exploited in the wild?
Yes. As of Nov 28, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on May 24, 2022.
Is there a public exploit for CVE-2016-4657?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2016-4657, the earliest disclosed Aug 25, 2016.
Is there a patch for CVE-2016-4657?
Upgrade affected devices to iOS 9.3.5 or a later supported release containing the fix. Devices that cannot receive a fixed release should be retired from sensitive use.
What products are affected by CVE-2016-4657?
Apple Iphone Os.
How severe is CVE-2016-4657?
CVE-2016-4657 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 69.0% (100th percentile) as of Nov 28, 2026.
Activity feed

Recent activity

4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence2Every report linking this CVE to a named adversary.
Associated malware4Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.