ImageMagick GIF coder vulnerability leading to memory disclosure
The ImageMagick GIF coder can leak uninitialised memory when processing crafted images, and the reporter bypassed HackerOne's GIF-only protection by generating the same exploit with other image extensions. An attacker could upload such files as a profile picture and recover server information such as the Linux version and directory paths.
- Triaged in 5 hours
- Fixed in 32 days
- Paid in 13 days
- Disclosed after 32 days
Hello Hackerone Security Team,
Well,we are aware of Imagemagick Gif parsor method to collect the pixels and then we can recover it to gain server information.
https://github.com/neex/gifoeb
However,it has no impact on hackerone since it's immune to gif files uploading functionality. So, ,gif exploit will not work at all using this method.
Today,I Bypassed that method and modified new files and well, server disclose the many information.
Hackerone profile picture uploading functionality supports .gif, .png, .bmp, ,.tiff and .tif.
Step to reproduce:-
1)Creating exploitable files
In the terminal, as we have to run ./gifoeb gen 512x512 dump.gif in order to create exploitable dump.gif file where 512x512 is pixel dimension and dump.gif is an gif file.
In order to bypass, You can modify the commands like this E.g
a) ./gifoeb gen 1123x987 dump.jpg b) ./gifoeb gen 1123x987 dump.png c) ./gifoeb gen 1123x987 dump.bmp d) ./gifoeb gen 1123x987 dump.tiff e) ./gifoeb gen 1123x987 dump.tif
It will create the dump files with different extensions. (Note: you can change the pixel dimension and file extension)
-
After creation of exploitable files, just upload in the profile settings. using modified Image files.
-
Server will return different pixel files.
-
Save and recover the pixel files.
In my case, I uploaded dump files with different extensions and after recovery, server disclose the linux version As well as Server path directory.
This exploit was successful since whenever We upload the files,if we try to save an image, the webpage will automatically give .gif extension to save profile pictures.
Attaching with Screenshot and previews.rar
With Regards Kunal Pandey
Impact
An attacker can collect Server info related to O/s and path directory and many more.
Attachments


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 ImageMagick GIF coder fails to initialise all pixel data, so uninitialised memory is included in the processed image.
Impact
An attacker could collect server information related to the operating system and directory paths, and possibly more.
What the attacker needed
Ability to upload a profile picture; crafted image file
How it was found
- Use the gifoeb tool to generate an exploitable image file.
- Modify the generation command to produce files with other image extensions such as jpg, png, bmp, tiff or tif.
- Upload the generated files through the profile picture settings.
- The server returns processed pixel files.
- Save and recover the pixel files to read the disclosed information.
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.
The reporter found that GIF uploads did not work on the site, but other image types still triggered the same bug.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.