Black box discovery of memory corruption RCE on box.com
The author used black-box thumbnail behaviour to show that Box's image thumbnailing backend was running an old, vulnerable image library. By crafting RLE image files that trigger an out-of-bounds write, a thumbnail succeeded or failed in a way that matched the vulnerable versus patched code, suggesting a memory corruption bug that could potentially lead to remote code execution.
Published on scarybeastsecurity.blogspot.com
Robust evidence existed for the presence of a memory corruption based RCE (remote code execution) on box.com servers. The most likely explanation for the evidence presented is the usage of an old ImageMagick which has known vulnerabilities, combined with lack of configuration lockdown.
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 bounds check on the plane number and write pointer in the RLE image decoder, allowing an out-of-bounds write during thumbnail generation.
Impact
The evidence suggests a memory corruption vulnerability in the thumbnailing backend that could potentially be exploited for remote code execution, though the author notes Box never confirmed the issues existed and later disabled the fringe decoders.
What the attacker needed
Ability to upload images; thumbnail generation enabled; no account details stated
The fix
Box disabled the unusual image decoders and the author believes the issues were fixed, though this was only confirmed through black-box testing.
How it was found
- Upload unusual image formats renamed with a .png extension to see which formats the thumbnailer accepts.
- Compare how a CIN test file renders locally in GraphicsMagick and ImageMagick to guess the backend.
- Craft an RLE file with a small image and a large pixel run so the vulnerable code clamps but the fixed code rejects it.
- Upload it and observe whether the thumbnail succeeds or fails.
- Craft an RLE file sized so the write lands exactly one byte past an mmap allocation, then upload it.
- Change one byte to move the write to the very end of the allocation and confirm the thumbnail succeeds again.
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.
When you upload an image to a file-sharing site, the site often makes a small preview picture, called a thumbnail. The software that makes that preview had a bug: a specially crafted image could make it write data past the end of a memory buffer. The researcher could not see the server, so he inferred the bug by noticing that one image made the preview fail while a nearly identical one succeeded.
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.