All reports
Medium

grub2: Crafted JPEG image can lead to buffer underflow write in the heap

Affected versions

Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2021-3697

Probability of exploitation in the next 30 days: 0.47%

FIRST EPSS · 2026-11-18

Description

A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be written in heap. To a successful to be performed the attacker needs to perform some triage over the heap layout and craft an image with a malicious format and payload. This vulnerability can lead to data corruption and eventual code execution or secure boot circumvention. This flaw affects grub2 versions prior grub-2.12.

A flaw was found in grub2 when handling JPEG images. This flaw allows an attacker to craft a malicious JPEG image, which leads to an underflow on a grub2's internal pointer, leading to a heap-based out-of-bounds write. Secure-boot mechanisms circumvention and arbitrary code execution may also be achievable.