Integer Overflow Vulnerability in GRUB2 Package Leading to Potential Code Execution

grub2 Updated 02 Oct 2025

Summary

03/03/2025
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2025-1125: 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 o... Affects grub2 versions < 2.12-6. Fixed in 2.12-6. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

GRUB2 (GRand Unified Bootloader 2) is a widely used bootloader for various operating systems, including Linux. It is responsible for loading the operating system kernel and managing the boot process. GRUB2 supports multiple filesystems, including HFS, which is used by macOS. The package is crucial for system startup and recovery, making its security paramount. This vulnerability specifically affects the HFS filesystem module within GRUB2, where improper handling of user-controlled parameters can lead to severe security risks.

Vulnerability Detail

The vulnerability arises when the GRUB2 HFS filesystem module reads data from a filesystem. It uses user-controlled parameters from the filesystem metadata to calculate internal buffer sizes but fails to adequately check for integer overflows. A maliciously crafted filesystem can exploit this flaw, leading to buffer size calculations that overflow. Consequently, this may result in a grub_malloc() operation requesting a smaller size than intended, allowing the hfsplus_open_compressed_real() function to write beyond the internal buffer's length. This flaw can corrupt GRUB's critical internal data and potentially allow arbitrary code execution, bypassing secure boot protections.

How To Fix

Minimum fixed version

2.12-6

This is the first release that contains the fix.

sudo apt-get install --only-upgrade grub2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability. However, users are advised to avoid using untrusted HFS filesystems until the package is updated.

Conclusion

The integer overflow vulnerability in the GRUB2 package poses a significant risk, allowing for potential arbitrary code execution. Users are strongly encouraged to update to the patched version 2.12-6 to mitigate this risk. Regular monitoring and prompt updates are essential for maintaining system security.

See every vulnerability recorded for grub2 →

Share this vulnerability

FAQ

The vulnerability can lead to arbitrary code execution, allowing attackers to bypass secure boot protections and potentially compromise the system.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

While there are no specific workarounds, it is advisable to avoid using untrusted HFS filesystems until the package is updated.

Yes, the vulnerability affects GRUB2 versions prior to 2.12-6. Updating to this version or later will mitigate the risk.

You can visit the official Debian security advisories or the GRUB2 project page for more detailed information on vulnerabilities and updates.

Related vulnerabilities

Recent vulnerabilities recorded for grub2.

How To Fix

Minimum fixed version

2.12-6

This is the first release that contains the fix.

sudo apt-get install --only-upgrade grub2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback