Cloudanix VulnDB

CVE-2021-3695

Medium · 4.5

CVSS

4.5

EPSS

0.5%

Published

Jul 6, 2022

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in handling certain image files could let an attacker corrupt memory or run unwanted code when the system starts up, though doing so is difficult.

Chainable
Exploitation
Local Privilege
Attacker needs
Local User
Complexity
High
Impact
Full Compromise
Component
Firmware
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

A crafted 16-bit grayscale PNG image triggers an out-of-bounds write in the heap, enabling heap data corruption or arbitrary code execution that can circumvent secure boot protections. Exploitation requires precise heap layout manipulation due to repeated write values.

Why it matters to the business

Attackers could potentially bypass boot security controls on affected systems, risking unauthorized code execution and system compromise, although the issue is complex to exploit and shows low observed activity.

How an attack unfolds

An attacker creates a malicious 16-bit grayscale PNG and delivers it to trigger parsing in the vulnerable component. The attacker must perform heap layout triage to produce usable corruption because values are written three times consecutively, limiting reliable payloads.

How to fix it

Upgrade to the fixed commit 5e9b167dce73bd6a804ab107ae4c4b95e6849597 or later in the repository. Ensure all instances use a version after the vulnerable releases.

How to confirm the fix worked

Verify the installed version or commit hash matches or exceeds the fixed commit; test PNG parsing with known-good images and confirm no crashes or corruption occur on crafted inputs.

Typical attack path

  1. Locate a system running an affected version prior to the fix
  2. Prepare a specially crafted 16-bit grayscale PNG image
  3. Trigger image parsing through the vulnerable code path
  4. Manipulate heap state to achieve corruption or code execution
  5. Attempt to bypass secure boot or gain control

How to detect it

Inspect logs for PNG parsing errors or crashes involving image processing; look for repeated memory write patterns or unexpected heap allocations during image handling.

What your security team should do

  • Apply the fixed commit or update to a patched release immediately
  • Prioritize systems that parse untrusted PNG images during boot or startup
  • Monitor EPSS and threat intelligence for any change in exploit maturity
  • Review secure boot configurations as a compensating control

The record

A crafted 16-bit grayscale PNG image may lead to a out-of-bounds write in the heap area. An attacker may take advantage of that to cause heap data corruption or eventually arbitrary code execution and circumvent secure boot protections. This issue has a high complexity to be exploited as an attacker needs to perform some triage over the heap layout to achieve signifcant results, also the values written into the memory are repeated three times in a row making difficult to produce valid payloads. This flaw affects grub2 versions prior grub-2.12.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 grub2-common 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-aa64 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-aa64-cdboot 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-aa64-modules 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-ia32 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-ia32-cdboot 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-ia32-modules 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-x64 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-x64-cdboot 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-efi-x64-modules 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-pc 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-pc-modules 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-ppc64le-modules 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-tools 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-tools-efi 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-tools-extra 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-tools-minimal 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 shim-aa64 0 15.6-1.el8.alma
AlmaLinux:8 shim-ia32 0 15.6-1.el8.alma
AlmaLinux:8 shim-unsigned-x64 0 15.6-1.el8.alma
AlmaLinux:8 shim-x64 0 15.6-1.el8.alma
AlmaLinux:9 grub2-common 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-aa64 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-aa64-cdboot 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-aa64-modules 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-x64 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-x64-cdboot 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-efi-x64-modules 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-pc 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-pc-modules 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-ppc64le 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-ppc64le-modules 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-tools 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-tools-efi 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-tools-extra 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 grub2-tools-minimal 0 1:2.06-27.el9_0.7.alma
AlmaLinux:9 shim-aa64 0 15.6-1.el9.alma
AlmaLinux:9 shim-unsigned-x64 0 15.6-1.el9.alma
AlmaLinux:9 shim-x64 0 15.6-1.el9.alma
Debian:11 grub2 0 2.06-3~deb11u1
Debian:12 grub2 0 2.06-3
Debian:13 grub2 0 2.06-3
Red Hat:enterprise_linux:8::baseos grub2 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-common 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-debuginfo 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-debugsource 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-cdboot 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-modules 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-cdboot 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-modules 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-cdboot 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-modules 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-pc 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-pc-modules 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le-modules 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-debuginfo 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi-debuginfo 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra-debuginfo 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal-debuginfo 0 1:2.02-123.el8_6.8
Red Hat:enterprise_linux:8::baseos shim 0 0:15.6-1.el8
Red Hat:enterprise_linux:8::baseos shim-aa64 0 0:15.6-1.el8
Red Hat:enterprise_linux:8::baseos shim-ia32 0 0:15.6-1.el8
Red Hat:enterprise_linux:8::baseos shim-x64 0 0:15.6-1.el8
Red Hat:enterprise_linux:8::crb shim-unsigned-x64 0 0:15.6-1.el8
Red Hat:enterprise_linux:9::baseos grub2 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-common 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-debugsource 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64-cdboot 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-aa64-modules 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-x64 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-x64-cdboot 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-efi-x64-modules 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-emu-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-pc 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-pc-modules 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-ppc64le 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-ppc64le-modules 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-efi 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-efi-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-extra 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-extra-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-minimal 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos grub2-tools-minimal-debuginfo 0 1:2.06-27.el9_0.7
Red Hat:enterprise_linux:9::baseos shim 0 0:15.6-1.el9
Red Hat:enterprise_linux:9::baseos shim-aa64 0 0:15.6-1.el9
Red Hat:enterprise_linux:9::baseos shim-x64 0 0:15.6-1.el9
Red Hat:enterprise_linux:9::crb shim-unsigned-x64 0 0:15.6-1.el9
Red Hat:rhel_e4s:8.1::baseos grub2 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-common 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-debuginfo 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-debugsource 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-aa64-modules 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-ia32 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-ia32-cdboot 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-ia32-modules 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-x64 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-x64-cdboot 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-efi-x64-modules 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-pc 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-pc-modules 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-ppc64le 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-ppc64le-modules 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-debuginfo 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-efi 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-efi-debuginfo 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-extra 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-extra-debuginfo 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-minimal 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos grub2-tools-minimal-debuginfo 0 1:2.02-87.el8_1.10
Red Hat:rhel_e4s:8.1::baseos shim 0 0:15.6-1.el8
Red Hat:rhel_e4s:8.1::baseos shim-ia32 0 0:15.6-1.el8
Red Hat:rhel_e4s:8.1::baseos shim-x64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.2::baseos grub2 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-common 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-debuginfo 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-debugsource 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-aa64 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-aa64-cdboot 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-aa64-modules 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-ia32 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-ia32-cdboot 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-ia32-modules 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-x64 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-x64-cdboot 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-efi-x64-modules 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-pc 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-pc-modules 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-ppc64le 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-ppc64le-modules 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-debuginfo 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-efi 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-efi-debuginfo 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-extra 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-extra-debuginfo 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-minimal 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos grub2-tools-minimal-debuginfo 0 1:2.02-87.el8_2.10
Red Hat:rhel_eus:8.2::baseos shim 0 0:15.6-1.el8
Red Hat:rhel_eus:8.2::baseos shim-aa64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.2::baseos shim-ia32 0 0:15.6-1.el8
Red Hat:rhel_eus:8.2::baseos shim-x64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.2::crb shim-unsigned-x64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.4::baseos grub2 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-common 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-debuginfo 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-debugsource 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-aa64 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-aa64-cdboot 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-aa64-modules 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-ia32 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-ia32-cdboot 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-ia32-modules 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-x64 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-x64-cdboot 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-efi-x64-modules 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-pc 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-pc-modules 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-ppc64le 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-ppc64le-modules 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-debuginfo 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-efi 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-efi-debuginfo 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-extra 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-extra-debuginfo 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-minimal 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos grub2-tools-minimal-debuginfo 0 1:2.02-99.el8_4.9
Red Hat:rhel_eus:8.4::baseos shim 0 0:15.6-1.el8
Red Hat:rhel_eus:8.4::baseos shim-aa64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.4::baseos shim-ia32 0 0:15.6-1.el8
Red Hat:rhel_eus:8.4::baseos shim-x64 0 0:15.6-1.el8
Red Hat:rhel_eus:8.4::crb shim-unsigned-x64 0 0:15.6-1.el8
Rocky Linux:8 grub2 0 1:2.02-123.el8_6.8
Rocky Linux:8 mokutil 0 1:0.3.0-11.el8_6.1
Rocky Linux:8 shim 0 0:15.6-1.el8
Rocky Linux:8 shim-unsigned-x64 0 0:15.6-1.el8
Rocky Linux:9 mokutil 0 2:0.4.0-8.el9_0.1
Rocky Linux:9 shim 0 0:15.6-1.el9
SUSE:Enterprise Storage 6 grub2 0 2.02-150100.123.12.2
SUSE:Enterprise Storage 7 grub2 0 2.04-150200.9.63.2
SUSE:HPE Helion OpenStack 8 grub2 0 2.02-137.2
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS grub2 0 2.02-150100.123.12.2
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS grub2 0 2.02-150100.123.12.2
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS grub2 0 2.04-150200.9.63.2
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS grub2 0 2.04-150200.9.63.2
SUSE:Linux Enterprise High Performance Computing 15-ESPOS grub2 0 2.02-150000.122.12.2
SUSE:Linux Enterprise High Performance Computing 15-LTSS grub2 0 2.02-150000.122.12.2

Related vulnerabilities