The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-3695

CVE-2021-3695: GNU GRUB2 RCE Vulnerability

CVE-2021-3695 is a remote code execution vulnerability in GNU GRUB2 caused by crafted PNG images leading to heap corruption. This article covers the technical details, affected versions, impact, and mitigation.

Published: February 25, 2026

CVE-2021-3695 Overview

CVE-2021-3695 is an out-of-bounds write vulnerability affecting GNU GRUB2, the widely used bootloader for Linux systems. A crafted 16-bit grayscale PNG image can trigger heap memory corruption, potentially allowing attackers to achieve arbitrary code execution and bypass secure boot protections. This vulnerability poses a significant risk to enterprise environments where secure boot is a critical security control.

Critical Impact

This vulnerability can be exploited to corrupt heap data, potentially leading to arbitrary code execution and secure boot bypass, though exploitation requires high complexity due to heap layout constraints.

Affected Products

  • GNU GRUB2 (versions prior to grub-2.12)
  • Fedora 36
  • Red Hat Enterprise Linux 8.0, 8.1, 8.2, 8.4, 8.6, 9.0
  • Red Hat Enterprise Linux EUS 8.2, 8.4, 8.6, 9.0
  • Red Hat OpenShift Container Platform 4.6, 4.9, 4.10
  • Red Hat Developer Tools 1.0
  • Red Hat CodeReady Linux Builder
  • NetApp ONTAP Select Deploy Administration Utility

Discovery Timeline

  • 2022-07-06 - CVE-2021-3695 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-3695

Vulnerability Analysis

This vulnerability exists in GRUB2's PNG image processing code, specifically when handling 16-bit grayscale PNG images. When a specially crafted PNG image is processed, the bootloader fails to properly validate image dimensions or pixel data, leading to an out-of-bounds write condition in the heap memory area.

The vulnerability is classified as CWE-787 (Out-of-bounds Write). Exploitation requires local access and has high complexity because the attacker must carefully manipulate the heap layout to achieve meaningful results. Additionally, the values written to memory are repeated three times consecutively, making it challenging to construct valid exploit payloads. Despite these constraints, successful exploitation can lead to heap data corruption, arbitrary code execution, and circumvention of secure boot protections—a critical security mechanism for system integrity.

Root Cause

The root cause lies in improper bounds checking within GRUB2's PNG decoder when processing 16-bit grayscale images. The code fails to validate that pixel data remains within allocated buffer boundaries, allowing write operations to overflow into adjacent heap memory. This memory safety issue is typical of vulnerabilities in low-level C code that handles complex file format parsing without adequate input validation.

Attack Vector

Exploitation of this vulnerability requires local access to the target system. An attacker must be able to place a malicious PNG image in a location where GRUB2 will process it during boot, such as the boot partition's theme or background image directories. The attack scenario involves:

  1. The attacker crafts a malicious 16-bit grayscale PNG image with specific dimensions and pixel data designed to trigger the overflow
  2. The malicious image is placed in a GRUB2 theme directory or configured as a boot background
  3. During system boot, GRUB2 processes the PNG image, triggering the heap overflow
  4. Through heap manipulation, the attacker can potentially corrupt critical data structures or achieve code execution

The vulnerability mechanism involves the PNG decoder allocating a buffer based on image header dimensions, then writing decompressed pixel data that exceeds the allocated buffer size. This overflow can overwrite adjacent heap metadata or application data. See the Red Hat Bug Report for additional technical details on the vulnerability.

Detection Methods for CVE-2021-3695

Indicators of Compromise

  • Presence of unusual or modified PNG files in GRUB2 theme directories (/boot/grub2/themes/)
  • Modified GRUB configuration files pointing to suspicious image files
  • Unexpected changes to the EFI System Partition or boot partition
  • Boot failures or anomalous behavior during GRUB2 image rendering

Detection Strategies

  • Monitor file integrity of GRUB2 configuration and theme directories using host-based intrusion detection
  • Implement Secure Boot with properly configured UEFI signature databases to detect unauthorized bootloader modifications
  • Use endpoint detection solutions to monitor for changes to boot-critical files and partitions
  • Audit access to the EFI System Partition and /boot directories for unauthorized modifications

Monitoring Recommendations

  • Enable logging for file system changes in boot-related directories
  • Implement automated integrity verification of bootloader components during system startup
  • Configure alerts for any modifications to GRUB2 theme files or configuration
  • Deploy SentinelOne agents to monitor for suspicious boot-time activity and file modifications

How to Mitigate CVE-2021-3695

Immediate Actions Required

  • Update GRUB2 to version 2.12 or later where the vulnerability is patched
  • Apply vendor-specific patches from Red Hat, Fedora, Gentoo, or NetApp as applicable to your environment
  • Review and restrict write access to GRUB2 theme and configuration directories
  • Verify Secure Boot is enabled and properly configured with updated signature databases

Patch Information

The vulnerability is fixed in GRUB2 version 2.12 and later. Multiple Linux distributions have released patches addressing this issue:

  • Red Hat: Patches available for RHEL 8.x and 9.x series - see Red Hat Bug Report
  • Gentoo: Security advisory GLSA 2022-09-12 provides patched packages
  • NetApp: Security advisory NTAP-20220930-0001 addresses ONTAP Select deployments
  • Fedora: Updated packages available for Fedora 36

Organizations should update their Secure Boot DBX (forbidden signatures) database after applying patches to revoke trust in vulnerable bootloader versions.

Workarounds

  • Disable GRUB2 graphical themes and background images by setting GRUB_TERMINAL=console in /etc/default/grub
  • Remove or restrict access to PNG files in GRUB2 theme directories
  • Implement strict file system permissions on boot partitions to prevent unauthorized image placement
  • Consider enabling UEFI Secure Boot with up-to-date revocation lists to block unsigned or vulnerable bootloaders
bash
# Disable GRUB2 graphical mode as a workaround
# Edit /etc/default/grub and add:
GRUB_TERMINAL=console

# Then regenerate GRUB configuration:
grub2-mkconfig -o /boot/grub2/grub.cfg

# Verify Secure Boot status:
mokutil --sb-state

# Check current GRUB2 version:
grub2-install --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechGnu Grub2

  • SeverityMEDIUM

  • CVSS Score4.5

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-787
  • Technical References
  • Red Hat Bug Report

  • Gentoo GLSA 2022-09-12

  • NetApp Security Advisory NTAP-20220930-0001
  • Related CVEs
  • CVE-2025-1125: GNU GRUB2 HFS Filesystem RCE Vulnerability

  • CVE-2023-4692: GNU GRUB2 NTFS RCE Vulnerability

  • CVE-2025-0686: GNU GRUB2 RCE Vulnerability

  • CVE-2025-0685: GNU GRUB2 RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English