CVE Vulnerabilities

CVE-2025-0622

Use After Free

Published: Feb 18, 2025 | Modified: Sep 18, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
6.4 MODERATE
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

NameVendorStart VersionEnd Version
Red Hat Enterprise Linux 10RedHatgrub2-1:2.12-15.el10_0*
Red Hat Enterprise Linux 9RedHatgrub2-1:2.06-104.el9_6*
Grub2Ubuntuesm-infra-legacy/trusty*
Grub2-signedUbuntuesm-infra-legacy/trusty*
Grub2-signedUbuntufocal*
Grub2-signedUbuntuoracular*
Grub2-signedUbuntuplucky*
Grub2-unsignedUbuntufocal*
Grub2-unsignedUbuntuoracular*
Grub2-unsignedUbuntuplucky*

Potential Mitigations

References