CVE-2023-40548
NixOS vulnerability analysis and mitigation

Overview

CVE-2023-40548 is a buffer overflow vulnerability discovered in the Shim bootloader's 32-bit system implementation. The vulnerability was disclosed on January 29, 2024, affecting Shim versions up to 15.8. The issue occurs when processing a user-controlled value from a PE binary, where an addition operation can lead to an integer overflow, subsequently causing a heap-based buffer overflow during memory allocation operations (NVD).

Technical details

The vulnerability stems from an integer overflow condition that occurs during the processing of PE binaries in the verify_sbat_section function. When compiled for 32-bit processors, the bootloader performs addition operations on user-controlled values without proper overflow checks. The overflowed value is then used as a size parameter for AllocatePool, leading to a heap buffer overflow when the resulting buffer is copied using the original value. The vulnerability has been assigned a CVSS v3.1 base score of 7.4 (High) with the vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (Red Hat).

Impact

The vulnerability can cause memory corruption and potentially lead to system crashes or data integrity issues during the boot phase. This is particularly critical as it affects the boot process and could compromise the security of the secure boot mechanism (NVD).

Mitigation and workarounds

The vulnerability has been fixed in Shim version 15.8. Multiple vendors have released security updates to address this issue. Red Hat has released updates across multiple versions of RHEL (7, 8, and 9), and it's crucial to note that the new Shim version revokes ALL PREVIOUS VERSIONS of GRUB2. Therefore, GRUB2 must be updated to the latest version simultaneously with Shim to maintain system bootability (Bugzilla, Debian).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22783HIGH8.1
  • NixOSNixOS
  • iris
NoYesJan 12, 2026
CVE-2026-0821MEDIUM6.9
  • NixOSNixOS
  • quickjs
NoNoJan 10, 2026
CVE-2025-68949MEDIUM5.3
  • NixOSNixOS
  • n8n
NoYesJan 13, 2026
CVE-2026-22784LOW2.3
  • NixOSNixOS
  • lychee
NoYesJan 12, 2026
CVE-2026-23497LOW1.3
  • NixOSNixOS
  • learning
NoYesJan 14, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management