---
id: CVE-2025-0622
title: A flaw was found in command/gpg
summary: >-
  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…
severity: medium
cvss: 6.4
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-416
published: '2025-02-18'
updated: '2026-06-25'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-0622'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2025:16154'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/errata/RHSA-2025:6990'
    label: secalert@redhat.com
  - url: 'https://access.redhat.com/security/cve/CVE-2025-0622'
    label: secalert@redhat.com
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2345865'
    label: secalert@redhat.com
  - url: 'https://lists.gnu.org/archive/html/grub-devel/2025-02/msg00024.html'
    label: secalert@redhat.com
tags:
  - nvd
epss: 0.00283
epssPercentile: 0.21046
ingestedAt: '2026-06-29T13:24:34.159Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
