Cloudanix VulnDB

CVE-2021-3981

Low · 3.3

CVSS

3.3

EPSS

0.3%

Published

Mar 10, 2022

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

a common system boot file that may contain passwords is readable by any user on the computer instead of being restricted to administrators only.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Trivial
Impact
Data Exposure
Component
Application
Class
Misconfiguration
Remediation
No Fix Yet
Effort
Other
Patch risk
Other

What it actually does

grub.cfg is generated with permissions allowing any local user to read its contents, exposing any encrypted passwords stored within the bootloader configuration.

Why it matters to the business

local users on affected systems may obtain bootloader passwords that were intended to remain confidential, increasing the risk of unauthorized boot parameter changes or further local privilege escalation attempts; the absence of an official fixed release extends exposure across all downstream distributions.

How an attack unfolds

an attacker with an existing local account on the system simply opens the world-readable grub.cfg file and extracts any password hashes or credentials that were placed there for bootloader protection.

How to fix it

manually set grub.cfg permissions to root-only readable (chmod 600) after every regeneration until an upstream release containing the fix is packaged by distributions; monitor grub2 package updates for the corrected version once published.

How to confirm the fix worked

verify that grub.cfg is owned by root with mode 600 and confirm no non-root users can open the file; re-run grub-mkconfig and re-check permissions after any bootloader configuration change.

Typical attack path

  1. obtain a valid local user account on the target host
  2. locate the grub.cfg file in its standard boot directory
  3. read the file contents directly due to permissive ownership
  4. extract any encrypted passwords for offline cracking or reuse

How to detect it

examine file permissions and ownership of grub.cfg across managed hosts; review local user activity logs for unexpected reads of bootloader configuration files; no network or remote indicators apply.

What your security team should do

  • apply the manual permission hardening immediately on all affected systems
  • add a post-install hook or cron job to enforce correct grub.cfg permissions after updates
  • track distribution package repositories for the first release containing the upstream fix and deploy it as soon as available
  • review any documented bootloader passwords and rotate them if exposure is confirmed

The record

A flaw in grub2 was found where its configuration file, known as grub.cfg, is being created with the wrong permission set allowing non privileged users to read its content. This represents a low severity confidentiality issue, as those users can eventually read any encrypted passwords present in grub.cfg. This flaw affects grub2 2.06 and previous versions. This issue has been fixed in grub upstream but no version with the fix is currently released.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 grub2-common 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-aa64 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-aa64-cdboot 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-aa64-modules 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-ia32 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-ia32-cdboot 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-ia32-modules 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-x64 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-x64-cdboot 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-efi-x64-modules 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-pc 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-pc-modules 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-ppc64le 0 1:2.02-123.el8_6.8.alma
AlmaLinux:8 grub2-ppc64le-modules 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-tools 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-tools-efi 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-tools-extra 0 1:2.02-123.el8.alma
AlmaLinux:8 grub2-tools-minimal 0 1:2.02-123.el8.alma
Debian:11 grub2 0 No fix
Debian:12 grub2 0 2.06-8
Debian:13 grub2 0 2.06-8
Red Hat:enterprise_linux:8::baseos grub2 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-common 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-debuginfo 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-debugsource 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-cdboot 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-aa64-modules 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-cdboot 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-ia32-modules 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-cdboot 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-efi-x64-modules 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-pc 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-pc-modules 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-ppc64le-modules 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-debuginfo 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-efi-debuginfo 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-extra-debuginfo 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal 0 1:2.02-123.el8
Red Hat:enterprise_linux:8::baseos grub2-tools-minimal-debuginfo 0 1:2.02-123.el8
Rocky Linux:8 grub2 0 1:2.02-123.el8
Ubuntu:16.04:LTS grub2-signed 0 No fix
Ubuntu:16.04:LTS grub2-unsigned 0 No fix
Ubuntu:18.04:LTS grub2-signed 0 No fix
Ubuntu:18.04:LTS grub2-unsigned 0 No fix
Ubuntu:20.04:LTS grub2-signed 0 1.187.3~20.04.1
Ubuntu:20.04:LTS grub2-unsigned 0 2.06-2ubuntu14.1
Ubuntu:20.04:LTS shim 0 15.7-0ubuntu1
Ubuntu:20.04:LTS shim-signed 0 1.40.9
Ubuntu:22.04:LTS grub2-signed 0 1.187.3~22.04.1
Ubuntu:22.04:LTS grub2-unsigned 0 2.06-2ubuntu14.1
Ubuntu:22.04:LTS shim 0 15.7-0ubuntu1
Ubuntu:22.04:LTS shim-signed 0 1.51.3
Ubuntu:Pro:14.04:LTS grub2-signed 0 No fix
Ubuntu:Pro:16.04:LTS grub2-signed 0 No fix
Ubuntu:Pro:16.04:LTS grub2-unsigned 0 No fix
Ubuntu:Pro:18.04:LTS grub2-signed 0 No fix
Ubuntu:Pro:18.04:LTS grub2-unsigned 0 No fix
openSUSE:Tumbleweed grub2 0 2.06-13.1

Related vulnerabilities