Skip to content
Memory corruption Disclosed report Advanced

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.

laudas Follow

Originally disclosed on HackerOne

Critical 9.1 View original
  • 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.

The original report as published on HackerOne, by laudas. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

More by laudas

View all

1 more disclosed report, best first.

More from Basecamp

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.