Yahoo Bleed 2
An out-of-bounds read in the SUN image decoder of an outdated ImageMagick allowed a crafted image to leak server memory, which was then returned as a JPEG thumbnail. An attacker could recover raw memory bytes, including session secrets and internal paths, from the thumbnail server.
scarybeastsecurity.blogspot.hk
Published on scarybeastsecurity.blogspot.hk
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 a missing length check in the SUN image decoder for 1-bit depth images, allowing an out-of-bounds read of heap memory.
Impact
The leaked memory contained session cookies, authentication tokens, and internal paths, potentially allowing an attacker to hijack sessions or gain further access.
What the attacker needed
Ability to upload an image; 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! and trigger the thumbnail fetch URL.
- The server processes the image with the vulnerable ImageMagick, causing an out-of-bounds read.
- The resulting thumbnail is a JPEG image containing leaked memory bytes.
- Download the JPEG and convert it back to 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 had a bug: when given a specially crafted image file, it read more data than it should have, pulling in other information from the server's memory. That memory was then turned into a picture that the attacker could download, revealing secrets like session cookies.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.