CVE-2025-0622

Grub2: command/gpg: use-after-free due to hooks not being removed on module unload

State
Published
Severity
6.4 Medium
Published
Feb 18, 2025
Updated
Oct 21, 2026
Reserved
Jan 21, 2025

Read the record on cve.org

Description

A flaw was found in command/gpg. In some scenarios, hooks created by loaded modules are not removed when the related module is unloaded. This flaw allows an attacker to force grub2 to call the hooks once the module that registered it was unloaded, leading to a use-after-free vulnerability. If correctly exploited, this vulnerability may result in arbitrary code execution, eventually allowing the attacker to bypass secure boot protections.

Scores

CVSSScoreVectorSource
3.16.4 MediumCVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:Hredhat

Weaknesses

Affected Products

ProductVersions
grub2
  • 2.12 and earlierAffected
Red Hat Enterprise Linux 10Red Hat
  • 1:2.12-15.el10_0 and laterNot affected
Red Hat Enterprise Linux 9Red Hat
  • 1:2.06-104.el9_6 and laterNot affected
Red Hat Enterprise Linux 7Red Hat
    Red Hat Enterprise Linux 8Red Hat
      Red Hat OpenShift Container Platform 4Red Hat

        References

        Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.