Kakadu SDK JPEG 2000 Unknown Marker Code Execution Vulnerability
A specially crafted JPEG 2000 file with an unknown marker causes an incorrect buffer size calculation, leading to an out-of-bounds write. An attacker could exploit this to achieve code execution.
Originally disclosed on Cisco Talos
A code execution vulnerability exists in the Kakadu SDK 7.9’s parsing of compressed JPEG 2000 images. A specially crafted JPEG 2000 file can be read by the program, and can lead to an out of bounds write causing an exploitable condition to arise.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the size field of an unknown marker is misinterpreted, causing a buffer to be allocated with an incorrect size and later written beyond its bounds.
Impact
An attacker could potentially execute arbitrary code by convincing a victim to open a malicious JPEG 2000 file.
What the attacker needed
Victim opens a malicious JPEG 2000 file
How it was found
- Craft a JPEG 2000 file with an unknown marker (0xFF79) and a manipulated size field.
- Open the file with a vulnerable application using Kakadu SDK 7.9.
- The parser misinterprets the size, leading to an out-of-bounds write and crash.
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.
JPEG 2000 files contain markers that tell the software how to process the image. When the software encounters an unknown marker, it miscalculates how much memory to allocate, then writes more data than the buffer can hold. This can crash the program or allow an attacker to run their own code.
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.