There's a possible overflow in handle_image() when shim tries to load and execute crafted EFI executables
Description
An overflow in shim's handle_image() function allows out-of-bounds writes when loading crafted EFI executables, potentially leading to arbitrary code execution.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An overflow in shim's handle_image() function allows out-of-bounds writes when loading crafted EFI executables, potentially leading to arbitrary code execution.
Vulnerability
The vulnerability resides in the handle_image() function of shim, which processes EFI executables during the boot process. The function uses the SizeOfRawData field from each section header without proper bounds checking, leading to an integer overflow or out-of-bounds write. This affects shim versions prior to the fix included in the coordinated disclosure of June 2022 [1].
Exploitation
An attacker with the ability to provide a crafted EFI executable—for example, by modifying the boot image or through a supply chain attack—can trigger the overflow. No authentication is required if the attacker can control the boot payload. The attacker must craft a malicious EFI binary with manipulated section headers to cause handle_image() to write beyond allocated buffers [1].
Impact
Successful exploitation results in out-of-bounds memory writes, which can corrupt critical data structures and potentially lead to arbitrary code execution at the firmware level. This could bypass secure boot protections and compromise the entire system [1].
Mitigation
The fix was included in the coordinated disclosure of multiple GRUB2 and shim vulnerabilities in June 2022. Users should update to the latest version of shim that contains the patch. No workaround is available; updating shim is required. As of the publication date, this CVE is not listed on CISA's Known Exploited Vulnerabilities catalog [1].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
64- osv-coords62 versionspkg:rpm/almalinux/grub2-commonpkg:rpm/almalinux/grub2-efi-aa64pkg:rpm/almalinux/grub2-efi-aa64-cdbootpkg:rpm/almalinux/grub2-efi-aa64-modulespkg:rpm/almalinux/grub2-efi-ia32pkg:rpm/almalinux/grub2-efi-ia32-cdbootpkg:rpm/almalinux/grub2-efi-ia32-modulespkg:rpm/almalinux/grub2-efi-x64pkg:rpm/almalinux/grub2-efi-x64-cdbootpkg:rpm/almalinux/grub2-efi-x64-modulespkg:rpm/almalinux/grub2-pcpkg:rpm/almalinux/grub2-pc-modulespkg:rpm/almalinux/grub2-ppc64lepkg:rpm/almalinux/grub2-ppc64le-modulespkg:rpm/almalinux/grub2-toolspkg:rpm/almalinux/grub2-tools-efipkg:rpm/almalinux/grub2-tools-extrapkg:rpm/almalinux/grub2-tools-minimalpkg:rpm/almalinux/shim-aa64pkg:rpm/almalinux/shim-ia32pkg:rpm/almalinux/shim-unsigned-x64pkg:rpm/almalinux/shim-x64pkg:rpm/opensuse/shim&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/shim&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/shim&distro=openSUSE%20Leap%20Micro%205.3pkg:rpm/opensuse/shim&distro=openSUSE%20Leap%20Micro%205.4pkg:rpm/suse/shim&distro=SUSE%20Enterprise%20Storage%207pkg:rpm/suse/shim&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP2-BCLpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-ESPOSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP4-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP5pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP4pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP5pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/shim&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4pkg:rpm/suse/shim&distro=SUSE%20Manager%20Proxy%204.2pkg:rpm/suse/shim&distro=SUSE%20Manager%20Proxy%204.3pkg:rpm/suse/shim&distro=SUSE%20Manager%20Server%204.2pkg:rpm/suse/shim&distro=SUSE%20Manager%20Server%204.3pkg:rpm/suse/shim&distro=SUSE%20OpenStack%20Cloud%209pkg:rpm/suse/shim&distro=SUSE%20OpenStack%20Cloud%20Crowbar%209
< 1:2.02-123.el8_6.8.alma+ 61 more
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.06-27.el9_0.7.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 1:2.02-123.el8_6.8.alma
- (no CPE)range: < 15.6-1.el8.alma
- (no CPE)range: < 15.6-1.el8.alma
- (no CPE)range: < 15.6-1.el8.alma
- (no CPE)range: < 15.6-1.el8.alma
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.7-22.15.1
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150100.3.35.1
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-150300.4.11.1
- (no CPE)range: < 15.8-150300.4.20.2
- (no CPE)range: < 15.7-25.24.1
- (no CPE)range: < 15.7-25.24.1
- Red Hat Bootloader Team/shimv5Range: 0
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"The handle_image() function in shim does not properly validate the SizeOfRawData field of EFI executable sections, allowing for out-of-bounds writes."
Attack vector
An attacker with high privileges and the ability to control EFI executables can craft a malicious EFI image. When shim attempts to load this crafted image, the handle_image() function will process the SizeOfRawData field. If this field is manipulated, it can lead to an out-of-bounds write into memory, potentially resulting in arbitrary code execution [ref_id=1].
Affected code
The vulnerability exists within the handle_image() function in shim, which is responsible for loading and executing EFI executables [ref_id=1].
What the fix does
The provided patch information does not detail the specific changes made to address this vulnerability. However, the advisory indicates that the vulnerability is a buffer overflow in handle_image() when loading crafted EFI executables [ref_id=1]. The fix would involve implementing proper validation for the SizeOfRawData field to prevent out-of-bounds writes.
Preconditions
- authAttacker must have high privileges.
- inputAttacker must be able to control crafted EFI executables.
Generated on Jun 6, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- cve.mitre.org/cgi-bin/cvename.cgimitreissue-tracking
- www.openwall.com/lists/oss-security/2022/06/07/5mitremailing-list
News mentions
0No linked articles in our index yet.