CVE-2025-1125Grub2: fs/hfs: integer overflow may lead to heap based out-of-bounds write
When reading data from a hfs filesystem, grub's hfs filesystem module uses user-controlled parameters from the filesystem metadata to calculate the internal buffers size, however it misses to properly check for integer overflows. A maliciouly crafted filesystem may lead some of those buffer size calculation to overflow, causing it to perform a grub_malloc() operation with a smaller size than expected. As a result the hfsplus_open_compressed_real() function will write past of the internal buffer length. This flaw may be leveraged to corrupt grub's internal critical data and may result in arbitrary code execution by-passing secure boot protections.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | grub2-signed | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 26.10 | grub2-unsigned | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 26.04 | grub2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | grub2-signed | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 26.04 | grub2-unsigned | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 25.10 | grub2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | grub2-signed | Will not fix the grub2 package does not affect Ubuntu's Secure Boot grub2-unsigned contains Secure Boot security fixes grub2 and grub2-unsigned should have same major… | UBUNTU-CVE-2025-1125 | |
| Ubuntu 25.10 | grub2-unsigned | Will not fix the grub2 package does not affect Ubuntu's Secure Boot grub2-unsigned contains Secure Boot security fixes grub2 and grub2-unsigned should have same major… | UBUNTU-CVE-2025-1125 | |
| Ubuntu 24.04 | grub2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | grub2-signed | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 24.04 | grub2-unsigned | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 22.04 | grub2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | grub2-signed | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 22.04 | grub2-unsigned | Under investigation | UBUNTU-CVE-2025-1125 | |
| Ubuntu 20.04 | grub2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | grub2-signed | Will not fix the grub2 package does not affect Ubuntu's Secure Boot grub2-unsigned contains Secure Boot security fixes grub2 and grub2-unsigned should have same major… | UBUNTU-CVE-2025-1125 | |
| Ubuntu 20.04 | grub2-unsigned | Will not fix the grub2 package does not affect Ubuntu's Secure Boot grub2-unsigned contains Secure Boot security fixes grub2 and grub2-unsigned should have same major… | UBUNTU-CVE-2025-1125 | |
| Ubuntu 18.04 | grub2-signed | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 18.04 | grub2-unsigned | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 16.04 | grub2-signed | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 16.04 | grub2-unsigned | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 14.04 | grub2 | Fix pending | UBUNTU-CVE-2025-1125 | |
| Ubuntu 14.04 | grub2-signed | Fix pending | UBUNTU-CVE-2025-1125 | |
| Debian 14 | grub2 | Fixed | 2.12-6 | DEBIAN-CVE-2025-1125 |
| Debian 13 | grub2 | Fixed | 2.12-6 | DEBIAN-CVE-2025-1125 |
| Debian 12 | grub2 | Fixed | 2.06-13+deb12u2 | DEBIAN-CVE-2025-1125 |
| Red Hat Enterprise Linux 10 | grub2 | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-common | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-aa64 | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-aa64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-aa64-modules | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-x64 | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-x64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-efi-x64-modules | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-pc | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-pc-modules | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-ppc64le | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-ppc64le-modules | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-tools | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-tools-efi | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-tools-extra | Not affected | ||
| Red Hat Enterprise Linux 10 | grub2-tools-minimal | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2 | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-common | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-aa64 | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-aa64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-aa64-modules | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-x64 | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-x64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-efi-x64-modules | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-pc | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-pc-modules | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-ppc64le | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-ppc64le-modules | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-tools | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-tools-efi | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-tools-extra | Not affected | ||
| Red Hat Enterprise Linux 9 | grub2-tools-minimal | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2 | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-common | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-aa64 | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-aa64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-aa64-modules | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-ia32 | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-ia32-cdboot | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-ia32-modules | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-x64 | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-x64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-efi-x64-modules | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-pc | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-pc-modules | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-ppc64le | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-ppc64le-modules | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-tools | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-tools-efi | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-tools-extra | Not affected | ||
| Red Hat Enterprise Linux 8 | grub2-tools-minimal | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2 | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-common | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-aa64-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-ia32 | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-ia32-cdboot | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-ia32-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-x64 | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-x64-cdboot | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-efi-x64-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-pc | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-pc-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-ppc-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-ppc64 | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-ppc64-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-ppc64le | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-ppc64le-modules | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-tools | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-tools-extra | Not affected | ||
| Red Hat Enterprise Linux 7 | grub2-tools-minimal | Not affected |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- grub2: affected: up to 2.12
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 4
Workaround: Do not run grub2 in an untrusted environment, specifically with a HFS file system image.
References
- https://access.redhat.com/security/cve/CVE-2025-1125
- https://bugzilla.redhat.com/show_bug.cgi?id=2346138
- https://lists.gnu.org/archive/html/grub-devel/2025-02/msg00024.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.