Skip to content
Memory corruption Write-up Advanced

iOS 18.6.1 0-click RCE POC

A memory corruption flaw in Apple's JPEG Lossless decompression code, reached through a crafted DNG image, could allow an out-of-bounds write. The author claims a modified DNG can trigger this path and that it does not crash a later iOS version, implying it was patched.

github.com

Published on github.com

Raw

The author, on github.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

Likely a missing or incorrect bounds check in Apple's JPEG Lossless decompression when the component count in the SOF3 block does not match the sample count declared in the DNG SubIFD.

Impact

The crafted image appears to cause an out-of-bounds write in the image parsing code, which the author frames as a zero-click remote code execution proof of concept, though the text does not demonstrate code execution and notes the file no longer crashes iOS 18.6.2.

What the attacker needed

Victim receives a crafted DNG file; specific DNG sample needed to reach path

The fix

The text implies the issue was fixed in iOS 18.6.2, since the proof of concept no longer crashes that version.

How it was found

  1. Obtain a sample DNG photograph from a public camera sample gallery.
  2. Change two specific bytes in the file to alter the sample-per-pixel value and the SOF3 component count.
  3. Deliver the modified file to the device, for example by AirDrop.

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.

A DNG is a raw photo file format, and inside it images can be stored using a compression method called JPEG Lossless. The researcher changed a couple of numbers in such a file so the decoder reads more data than it should and writes past the end of a memory buffer, which is a classic memory safety bug. The report is very short and does not prove code execution, only that a suspicious code path is reached.

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.