Skip to content
Memory corruption Write-up Advanced

Analyzing The ForcedEntry Zero-Click iPhone Exploit Used By Pegasus

The ForcedEntry exploit used by Pegasus spyware exploited an integer overflow in CoreGraphics' JBIG2 decoder to cause an out-of-bounds write, allowing attackers to execute code without user interaction. Attackers could bypass Apple's BlastDoor and PAC protections to compromise iPhones.

trendmicro.com

Published on trendmicro.com

Citizen Lab has released a report on a new iPhone threat dubbed ForcedEntry. This zero-click exploit seems to be able to circumvent Apple's BlastDoor security, and allow attackers access to a device without user interaction.

The author, on trendmicro.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

An integer overflow in the calculation of numSyms leads to an undersized heap buffer allocation, which is then overflowed when filling it with bitmap data.

Impact

The exploit could allow attackers to compromise the device without user interaction, bypassing BlastDoor and PAC, though it targeted specific activists rather than common users.

What the attacker needed

Victim uses iMessage; device runs vulnerable iOS version; attacker sends malicious iMessage attachment

The fix

Apple fixed the vulnerability in iOS 14.8 by adding boundary checks to prevent overflowing the syms buffer.

How it was found

  1. The attacker sends a malicious iMessage attachment containing a crafted JBIG2-encoded PDF.
  2. The victim's device automatically processes the attachment, invoking CoreGraphics' JBIG2 decoder.
  3. The decoder calculates numSyms with an integer overflow, allocating a too-small buffer.
  4. The decoder fills the buffer with bitmap data, causing an out-of-bounds write.
  5. The attacker leverages the memory corruption to bypass PAC and disable ASLR, achieving code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes a real-world iPhone attack where simply receiving a malicious iMessage could infect the phone without any taps. The flaw was in how the phone's software decoded a specific image format, allowing an attacker to write data beyond the intended memory area and take control.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.