Skip to content
Fencer Intel
high 7.0

CVE-2021-3697 json

A crafted JPEG image may lead the JPEG reader to underflow its data pointer, allowing user-controlled data to be written in heap.

published 4y ago modified 4mo ago also EUVD-2021-26982

cvss
7.0
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
0.5%
EPSS 0.5% chance of exploitation in 30 days, percentile 40%
public exploits
0
none known

Summary

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.

Patch / fix

  • gnu grub2 2.12
  • grub2 Debian 14, Debian 13, Debian 12 2.06-3

debian advisories DEBIAN-CVE-2021-3697

  • grub2-signed Ubuntu 18.04 LTS 1.187.3~18.04.1
  • grub2-signed Ubuntu 20.04 LTS 1.187.3~20.04.1
  • grub2-signed Ubuntu 22.04 LTS 1.187.3~22.04.1
  • grub2-unsigned Ubuntu 22.04 LTS, Ubuntu 20.04 LTS, Ubuntu 18.04 LTS 2.06-2ubuntu14.1

ubuntu advisories UBUNTU-CVE-2021-3697

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • shim-unsigned-x64 RHEL 9 15.6-1.el9
  • shim RHEL 9 15.6-1.el9
  • grub2 RHEL 9 1:2.06-27.el9_0.7
  • grub2-pc RHEL 9 1:2.06-27.el9_0.7
  • shim-x64 RHEL 9 15.6-1.el9
  • shim-aa64 RHEL 9 15.6-1.el9
  • grub2-tools RHEL 9 1:2.06-27.el9_0.7
  • grub2-common RHEL 9 1:2.06-27.el9_0.7

red hat advisories RHSA-2022:5099RHSA-2022:5100RHSA-2022:5095RHSA-2022:5096RHSA-2022:5098

  • grub2 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +6 more 2.04-150200.9.63.2
  • grub2 SLE Micro 5.1 2.04-150300.3.5.1
  • grub2 SLE Module for Server Applications 15 SP3, SLE Module for Basesystem 15 SP3, SLE Micro 5.2 +2 more 2.04-150300.22.20.2
  • grub2 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +3 more 2.02-150100.123.12.2
  • grub2 SLES 12 SP2-BCL 2.02-115.67.2
  • grub2 SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +3 more 2.02-143.2
  • grub2 SLES for SAP 12 SP3, SLES 12 SP3-LTSS, SLES 12 SP3-BCL +3 more 2.02-137.2
  • grub2 SLES for SAP 15, SLES 15-LTSS, SLE High Performance Computing 15-LTSS +1 more 2.02-150000.122.12.2

suse advisories SUSE-SU-2022:2074-1SUSE-SU-2022:2073-1SUSE-SU-2022:2064-1SUSE-SU-2022:2041-1SUSE-SU-2022:2039-1SUSE-SU-2022:2038-1

  • grub2 openSUSE Tumbleweed 2.06-25.1

opensuse advisories openSUSE-SU-2024:12137-1

  • shim-unsigned-x64 AlmaLinux 8 15.6-1.el8.alma
  • grub2-pc AlmaLinux 8 1:2.02-123.el8_6.8.alma
  • shim-x64 AlmaLinux 8 15.6-1.el8.alma
  • shim-aa64 AlmaLinux 8 15.6-1.el8.alma
  • shim-ia32 AlmaLinux 8 15.6-1.el8.alma
  • grub2-tools AlmaLinux 8 1:2.02-123.el8_6.8.alma
  • grub2-common AlmaLinux 8 1:2.02-123.el8_6.8.alma
  • grub2-efi-x64 AlmaLinux 8 1:2.02-123.el8_6.8.alma

almalinux advisories ALSA-2022:5095ALSA-2022:5099

  • shim Rocky Linux 9 15.6-1.el9
  • shim Rocky Linux 9 15.6-1.el9.rocky.0.1
  • mokutil Rocky Linux 9 2:0.4.0-8.el9_0.1
  • shim-unsigned-x64 Rocky Linux 8 15.6-1.el8
  • shim Rocky Linux 8 15.6-1.el8
  • grub2 Rocky Linux 8 1:2.02-123.el8_6.8
  • mokutil Rocky Linux 8 1:0.3.0-11.el8_6.1

rocky linux advisories RLSA-2022:5099RLSA-2022:5095

  • grub Alpine 3.16, Alpine 3.15 2.06-r3
  • grub Alpine 3.17 2.06-r8
  • grub Alpine 3.18 2.06-r12
  • grub Alpine 3.24, Alpine 3.23, Alpine 3.22 +3 more 2.06-r13

alpine advisories ALPINE-CVE-2021-3697

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • grub2 CBL-Mariner 2.0 2.06-12
  • grub2 Azure Linux 3.0 2.06-14

azure linux advisories AZL-31036AZL-34785

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Is CVE-2021-3697 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-3697 updated cvss 7.5

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

  • Red Hat Enterprise Linux 7 grub2, grub2-pc, grub2-efi, grub2-ppc64, grub2-tools, grub2-common, +15 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux BaseOS (v. 8) grub2 2.02-123.el8_6.8, grub2-pc 2.02-123.el8_6.8, grub2-tools 2.02-123.el8_6.8, grub2-common 2.02-123.el8_6.8, grub2-efi-x64 2.02-123.el8_6.8, grub2-ppc64le 2.02-123.el8_6.8, +13 more
    fixed: vendor fix RHSA-2022:5095
  • Red Hat Enterprise Linux BaseOS (v. 9) grub2 2.06-27.el9_0.7, grub2-pc 2.06-27.el9_0.7, grub2-tools 2.06-27.el9_0.7, grub2-common 2.06-27.el9_0.7, grub2-efi-x64 2.06-27.el9_0.7, grub2-ppc64le 2.06-27.el9_0.7, +10 more
    fixed: vendor fix RHSA-2022:5099
  • Red Hat Enterprise Linux BaseOS E4S (v. 8.1) grub2 2.02-87.el8_1.10, grub2-pc 2.02-87.el8_1.10, grub2-tools 2.02-87.el8_1.10, grub2-common 2.02-87.el8_1.10, grub2-efi-x64 2.02-87.el8_1.10, grub2-ppc64le 2.02-87.el8_1.10, +11 more
    fixed: vendor fix RHSA-2022:5098
  • Red Hat Enterprise Linux BaseOS EUS (v. 8.2) grub2 2.02-87.el8_2.10, grub2-pc 2.02-87.el8_2.10, grub2-tools 2.02-87.el8_2.10, grub2-common 2.02-87.el8_2.10, grub2-efi-x64 2.02-87.el8_2.10, grub2-ppc64le 2.02-87.el8_2.10, +13 more
    fixed: vendor fix RHSA-2022:5100
  • Red Hat Enterprise Linux BaseOS EUS (v.8.4) grub2 2.02-99.el8_4.9, grub2-pc 2.02-99.el8_4.9, grub2-tools 2.02-99.el8_4.9, grub2-common 2.02-99.el8_4.9, grub2-efi-x64 2.02-99.el8_4.9, grub2-ppc64le 2.02-99.el8_4.9, +13 more
    fixed: vendor fix RHSA-2022:5096
  • Red Hat CodeReady Linux Builder (v. 9) shim-unsigned-x64 15.6-1.el9 Red Hat CodeReady Linux Builder EUS (v. 8.2) shim-unsigned-x64 15.6-1.el8 Red Hat Enterprise Linux BaseOS (v. 8) shim 15.6-1.el8, shim-x64 15.6-1.el8, shim-aa64 15.6-1.el8, shim-ia32 15.6-1.el8, mokutil 0.3.0-11.el8_6.1 Red Hat Enterprise Linux BaseOS (v. 9) shim 15.6-1.el9, shim-x64 15.6-1.el9, shim-aa64 15.6-1.el9, mokutil 0.4.0-8.el9_0.1 Red Hat Enterprise Linux BaseOS E4S (v. 8.1) shim 15.6-1.el8, shim-x64 15.6-1.el8, shim-ia32 15.6-1.el8, mokutil 0.3.0-9.el8_1.1 Red Hat Enterprise Linux BaseOS EUS (v. 8.2) shim 15.6-1.el8, shim-x64 15.6-1.el8, shim-aa64 15.6-1.el8, shim-ia32 15.6-1.el8, mokutil 0.3.0-9.el8_2.2
    +3 more products
    Red Hat Enterprise Linux BaseOS EUS (v.8.4) shim 15.6-1.el8, shim-x64 15.6-1.el8, shim-aa64 15.6-1.el8, shim-ia32 15.6-1.el8, mokutil 0.3.0-11.el8_4.1 Red Hat Enterprise Linux CRB (v. 8) shim-unsigned-x64 15.6-1.el8 Red Hat Enterprise Linux CRB EUS (v.8.4) shim-unsigned-x64 15.6-1.el8
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.47% chance of exploitation in the next 30 days, higher than 40% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
NVD 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 4.4 AV:L/AC:M/Au:N/C:P/I:P/A:P

Affected products

  • n/a grub2

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.