Image upload reaches TIFF/JPEG heap overwrite (potential RCE)
A heap buffer overflow exists in the libvips image processing library used by Basecamp, caused by a mismatch between the TIFF container's component count and the embedded JPEG output. An attacker could potentially achieve remote code execution through control-flow hijacking.
- Triaged in 8 hours
- Fixed in 5 days
- Paid in 9 hours
- Disclosed after 3 months
Summary by the program
The report describes a critical heap buffer overflow vulnerability in the libvips image processing library used by Basecamp. The analysis found that a mismatch between the TIFF container component count (1 byte/pixel) and the embedded JPEG output (2 bytes/pixel) leads to a deterministic heap buffer overwrite. The researcher provided clear reproduction steps, multiple proof-of-concept files, and demonstrated the potential for remote code execution through control-flow hijacking.
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 TIFF parser trusts the container's component count (1 byte per pixel) but the embedded JPEG decoder outputs 2 bytes per pixel, so the buffer allocated for the TIFF data is too small for the JPEG output.
Impact
An attacker could potentially achieve remote code execution through control-flow hijacking, as the researcher demonstrated.
What the attacker needed
Ability to upload an image; server uses libvips to process uploads
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.
When an image is uploaded, the server uses a library called libvips to process it. A bug in that library means that for a special kind of image file, the server writes more data into memory than it reserved, which can crash the server or let an attacker run their own code. This is called a heap buffer overflow.
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.