Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-3981

CVE-2021-3981: GNU GRUB2 Information Disclosure Flaw

CVE-2021-3981 is an information disclosure flaw in GNU GRUB2 where grub.cfg is created with incorrect permissions, allowing unprivileged users to read encrypted passwords. This article covers affected versions and fixes.

Published: February 25, 2026

CVE-2021-3981 Overview

A flaw in GRUB2 was found where its configuration file, known as grub.cfg, is being created with incorrect permission settings allowing non-privileged users to read its content. This represents a confidentiality issue, as those users can eventually read any encrypted passwords present in the configuration file. The vulnerability affects GRUB2 version 2.06 and all previous versions. While this issue has been fixed in the upstream GRUB2 repository, no version with the fix has been officially released at the time of initial disclosure.

Critical Impact

Non-privileged local users can read sensitive configuration data including encrypted passwords from grub.cfg due to improper file permissions.

Affected Products

  • GNU GRUB2 versions 2.06 and earlier
  • Fedora Project Fedora 34
  • Linux distributions using vulnerable GRUB2 versions

Discovery Timeline

  • 2022-03-10 - CVE-2021-3981 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-3981

Vulnerability Analysis

This vulnerability stems from improper default permissions (CWE-276) applied to the GRUB2 bootloader configuration file during system installation or configuration updates. When grub.cfg is generated or modified, the file permissions are set in a manner that allows read access to non-privileged users on the system. While GRUB2 encrypted passwords provide some protection, they can potentially be subjected to offline brute-force attacks once extracted from the readable configuration file.

The security impact is primarily focused on confidentiality. An attacker with local access to the system can read the contents of grub.cfg to extract encrypted boot passwords, kernel parameters, and other potentially sensitive boot configuration details. This information could be leveraged in subsequent attacks or to gain unauthorized access to boot menu editing capabilities.

Root Cause

The root cause is classified as CWE-276: Incorrect Default Permissions. During the GRUB2 configuration file generation process, the system fails to apply appropriately restrictive permissions to grub.cfg. The file should only be readable by the root user, but the default behavior allows broader read access to local users on the system.

Attack Vector

The attack vector is local, requiring the attacker to have existing access to the target system. The exploitation process involves:

  1. A local user authenticates to the affected system with any valid non-root account
  2. The attacker navigates to the GRUB2 configuration directory (typically /boot/grub2/ or /boot/grub/)
  3. The attacker reads the contents of grub.cfg using standard file reading utilities
  4. Encrypted passwords and sensitive boot parameters can be extracted for offline analysis

The vulnerability requires local access and low privileges to exploit. No user interaction is required, and the scope is unchanged (the attacker can only access information on the vulnerable system). The attack does not impact integrity or availability of the system.

Detection Methods for CVE-2021-3981

Indicators of Compromise

  • Unusual file access attempts to /boot/grub2/grub.cfg or /boot/grub/grub.cfg by non-root users
  • Audit logs showing read operations on GRUB configuration files from unauthorized accounts
  • Evidence of password cracking attempts using extracted boot password hashes

Detection Strategies

  • Enable file access auditing on GRUB2 configuration files using auditd
  • Monitor for unauthorized access attempts to /boot/grub2/ directory contents
  • Implement file integrity monitoring (FIM) solutions to detect configuration file access patterns
  • Review system logs for suspicious read operations against boot configuration files

Monitoring Recommendations

  • Configure audit rules to log all access attempts to grub.cfg files
  • Deploy endpoint detection solutions capable of monitoring sensitive file access
  • Establish baseline access patterns for boot configuration files and alert on deviations
  • Regularly review file permissions on critical system configuration files

How to Mitigate CVE-2021-3981

Immediate Actions Required

  • Verify and correct file permissions on grub.cfg to restrict read access to root only
  • Audit existing GRUB2 passwords and rotate if exposure is suspected
  • Update GRUB2 to the latest version available for your distribution
  • Review system users who may have accessed the configuration file

Patch Information

The vulnerability has been addressed in upstream GRUB2, though official patched releases may vary by distribution. Administrators should apply distribution-specific security updates as they become available. Consult your distribution's security advisories for specific patch information:

  • Red Hat Bugzilla Report - Vendor bug tracking
  • Fedora Package Announcement - Fedora updates
  • Gentoo GLSA 202209-12 - Gentoo security advisory

Workarounds

  • Manually set restrictive permissions on grub.cfg using chmod 600 or chmod 400
  • Ensure the file ownership is set to root:root
  • Consider implementing additional access controls using SELinux or AppArmor policies
  • Regenerate GRUB configuration after setting proper permissions to ensure they persist
bash
# Configuration example
# Fix permissions on GRUB2 configuration file
chmod 600 /boot/grub2/grub.cfg
chown root:root /boot/grub2/grub.cfg

# For systems using /boot/grub path
chmod 600 /boot/grub/grub.cfg
chown root:root /boot/grub/grub.cfg

# Verify the permissions are correctly applied
ls -la /boot/grub2/grub.cfg

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

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechGnu Grub2

  • SeverityLOW

  • CVSS Score3.3

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-276
  • Technical References
  • Openwall OSS Security List

  • Fedora Package Announcement

  • Gentoo GLSA 202209-12
  • Vendor Resources
  • Red Hat Bugzilla Report
  • Related CVEs
  • CVE-2023-4693: GNU GRUB2 Information Disclosure Flaw

  • CVE-2025-1125: GNU GRUB2 HFS Filesystem RCE Vulnerability

  • CVE-2025-0689: GNU GRUB2 Buffer Overflow Vulnerability

  • CVE-2023-4692: GNU GRUB2 NTFS 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