*bleed, more powerful: dumping Yahoo! authentication secrets with an out-of-bounds read
An out-of-bounds read in the SUN image decoder of an outdated ImageMagick allowed an attacker to leak raw server memory via thumbnail generation. The leaked memory contained authentication secrets and internal paths, which could be exfiltrated through JPEG-compressed images.
Published on scarybeastsecurity.blogspot.com
In my previous post on Yahoobleed #1 (YB1), we saw how an uninitialized memory vulnerability could lead to disclosure of private images belonging to other users. The resulting leaked memory bytes were subject to JPEG compression, which is not a problem for image theft, but is somewhat lacking if we wanted to steal…
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 the SUN decoder did not validate that the image data length was sufficient for the number of pixels when the bit depth was 1, leading to an out-of-bounds read.
Impact
The leaked memory contained session cookies, authentication tokens, and internal URLs, which could allow an attacker to impersonate users or access private data.
What the attacker needed
Ability to upload images; thumbnail generation enabled
The fix
Yahoo! fixed the issue by retiring ImageMagick.
How it was found
- Craft a SUN image file with width=256, height=256, depth=1, and a small data length (e.g., 8 bytes).
- Upload the file to Yahoo! to trigger thumbnail generation.
- Fetch the thumbnail URL to retrieve the rendered image containing leaked memory.
- Convert the returned JPEG to recover raw bytes using a threshold and negate operation.
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.
The image processing software used by Yahoo! had a bug: when given a specially crafted image file, it read more data from memory than it should have. That extra data, which could include secret tokens and internal paths, was then turned into a picture that the attacker could download. This is like accidentally photocopying the next page of a document when you only meant to copy one page.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.