CVE-2021-3697: High severity GNU GRUB2 vulnerability

Published Aug 9, 2021
·
Updated

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.

Other sources

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.

— Red Hat

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.

Affected Software

56 affected componentsFixes available
debian/grub2
2.06-3~deb10u12.06-3~deb10u32.06-3~deb11u52.06-3~deb11u42.06-132.12~rc1-9
redhat/grub2<1:2.02-123.el8_6.8
1:2.02-123.el8_6.8
redhat/grub2<1:2.02-87.el8_1.10
1:2.02-87.el8_1.10
redhat/grub2<1:2.02-87.el8_2.10
1:2.02-87.el8_2.10
redhat/grub2<1:2.02-99.el8_4.9
1:2.02-99.el8_4.9
redhat/grub2<1:2.06-27.el9_0.7
1:2.06-27.el9_0.7
redhat/grub<2.12
2.12
GNU GRUB2>=2.00<2.12
redhat Developer Tools=1.0
redhat Openshift=3.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=8.1
redhat Enterprise Linux=8.4
redhat Enterprise Linux=9.0
redhat Enterprise Linux Eus=8.2
redhat Enterprise Linux Eus=8.4
redhat Enterprise Linux Eus=8.6
redhat Enterprise Linux Eus=9.0
redhat Enterprise Linux For Power Little Endian=8.0
redhat Enterprise Linux For Power Little Endian=9.0
redhat Enterprise Linux For Power Little Endian Eus=8.2
redhat Enterprise Linux For Power Little Endian Eus=8.4
redhat Enterprise Linux For Power Little Endian Eus=8.6
redhat Enterprise Linux For Power Little Endian Eus=9.0
redhat Enterprise Linux Server Aus=8.2
redhat Enterprise Linux Server Aus=8.4
redhat Enterprise Linux Server Aus=8.6
redhat Enterprise Linux Server For Power Little Endian Update Services For Sap Solutions=8.1
redhat Enterprise Linux Server For Power Little Endian Update Services For Sap Solutions=8.2
redhat Enterprise Linux Server For Power Little Endian Update Services For Sap Solutions=8.4
redhat Enterprise Linux Server For Power Little Endian Update Services For Sap Solutions=8.6
redhat Enterprise Linux Server For Power Little Endian Update Services For Sap Solutions=9.0
redhat Enterprise Linux Server Tus=8.2
redhat Enterprise Linux Server Tus=8.4
redhat Enterprise Linux Server Tus=8.6
redhat OpenShift Container Platform=4.6
redhat OpenShift Container Platform=4.9
redhat OpenShift Container Platform=4.10
redhat Enterprise Linux=8.0
redhat Codeready Linux Builder
redhat Enterprise Linux=9.0
redhat Enterprise Linux Eus=8.2
redhat Enterprise Linux Eus=8.4
redhat Enterprise Linux Eus=8.6
redhat Enterprise Linux Eus=9.0
All of the following
Any of the following
redhat OpenShift Container Platform=4.6
redhat OpenShift Container Platform=4.9
redhat OpenShift Container Platform=4.10
redhat Enterprise Linux=8.0
All of the following
redhat Codeready Linux Builder
Any of the following
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat Enterprise Linux Eus=8.2
redhat Enterprise Linux Eus=8.4
redhat Enterprise Linux Eus=8.6
redhat Enterprise Linux Eus=9.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/grub2 to a version that resolves this vulnerability.

    Fixed in 2.06-3~deb10u1Fixed in 2.06-3~deb10u3Fixed in 2.06-3~deb11u5Fixed in 2.06-3~deb11u4Fixed in 2.06-13Fixed in 2.12~rc1-9
  2. Upgrade

    Upgrade redhat/grub2 to a version that resolves this vulnerability.

    Fixed in 1:2.02-123.el8_6.8
  3. Upgrade

    Upgrade redhat/grub2 to a version that resolves this vulnerability.

    Fixed in 1:2.02-87.el8_1.10
  4. Upgrade

    Upgrade redhat/grub2 to a version that resolves this vulnerability.

    Fixed in 1:2.02-87.el8_2.10
  5. Upgrade

    Upgrade redhat/grub2 to a version that resolves this vulnerability.

    Fixed in 1:2.02-99.el8_4.9
  6. Upgrade

    Upgrade redhat/grub2 to a version that resolves this vulnerability.

    Fixed in 1:2.06-27.el9_0.7
  7. Upgrade

    Upgrade redhat/grub to a version that resolves this vulnerability.

    Fixed in 2.12
  8. Upgrade

    Upgrade grub2 to a version that resolves this vulnerability.

    Fixed in grub-2.12

Event History

Jun 7, 2022
CVE Published
12:00 AM
Jul 6, 2022
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
CVE Published
via MITRE·03:06 PM
Data Sourced
via MITRE·03:06 PM
DescriptionWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2021-3697?

CVE-2021-3697 is a vulnerability in grub2 that allows an attacker to craft a malicious JPEG image, leading to a heap underflow and potential remote code execution.

2

How can an attacker exploit CVE-2021-3697?

An attacker can exploit CVE-2021-3697 by creating a specially crafted JPEG image that triggers a heap underflow when processed by the grub2 JPEG reader, allowing them to execute arbitrary code.

3

Which software versions are affected by CVE-2021-3697?

CVE-2021-3697 affects grub2 versions up to, but not including, 2.12.

4

How can I fix CVE-2021-3697?

To fix CVE-2021-3697, you should update your grub2 package to version 2.12 or later, as provided by the respective vendor's patch or security advisory.

5

What is the severity of CVE-2021-3697?

CVE-2021-3697 has a severity rating of high, with a CVSSv3 base score of 7.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203