Skip to content
Memory corruption Advisory Advanced CVE-2016-4637

Apple Core Graphics BMP Framework img_decode_read Remote Code Execution Vulnerability

A crafted BMP image can trigger an out-of-bounds write in Apple's Core Graphics framework due to improper validation of image height, leading to remote code execution when opened in any application using the API.

Tyler Bohan Follow

Originally disclosed on Cisco Talos

Medium 6.3 View original

An exploitable out of bounds write exists in the handling of BMP images on Apple OS X and iOS. A crafted BMP document can lead to an out of bounds write resulting in remote code execution.

Tyler Bohan, on Cisco Talos

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the image height is not properly checked, leading to a sign extension error when calculating an index into the image data buffer.

What the attacker needed

Victim opens a crafted BMP file

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 report has not been written yet. The Original tab links to the source.

This report describes a bug in how Apple's software handles BMP image files. A specially made image can cause the program to write data outside the intended memory area, which can let an attacker run their own code on the victim's device. The victim just needs to open the malicious image in a program that uses Apple's image processing.

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.

More by Tyler Bohan

View all

84 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

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.