Beware! You Can Get Hacked Just by Opening a ‘JPEG 2000’ Image

Researchers have disclosed a critical zero-day vulnerability in the JPEG 2000 image file format parser implemented in OpenJPEG library, which could allow an attacker to remotely execute arbitrary code on the affected systems.

Discovered by security researchers at Cisco Talos group, the zero-day flaw, assigned as TALOS-2016-0193/CVE-2016-8332, could allow an out-of-bound heap write to occur that triggers the heap corruption and leads to arbitrary code execution.

OpenJPEG is an open-source JPEG 2000 codec. Written in C language, the software was developed for coding and encoding JPEG2000 images, a format that is often used for tasks like embedding image files within PDF documents through popular software including PdFium, Poppler, and MuPDF.

Hackers can exploit the security vulnerability by tricking the victim into opening a specially crafted, malicious JPEG2000 image or a PDF document containing that malicious file in an email.

The hacker could even upload the malicious JPEG2000 image file to a file hosting service, like Dropbox or Google Drive, and then send that link to the victim.

Once downloaded to the system, it would create a way for hackers to remotely execute malicious code on the affected system.

The flaw was caused "due to an error while parsing mcc records in the jpeg2000 file,…resulting in an erroneous read and write of adjacent heap area memory," Cisco explained in its advisory.

"Careful manipulation of heap layout and can lead to further heap metadata process memory corruption ultimately leading to code execution under attacker control."

The researchers successfully tested the JPEG 2000 image exploit on the OpenJPEG openjp2 version 2.1.1. The flaw was discovered by Aleksandar Nikolic from the Cisco Talos Security team.

The team reported the zero-day flaw to OpenJPEG developers in late July, and the company patched the flaw last week with the release of version 2.1.2.

The vulnerability has been assigned a CVSS score of 7.5, categorizing it as a high-severity bug.