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-2022-0563

CVE-2022-0563: Util-linux Privilege Escalation Flaw

CVE-2022-0563 is a privilege escalation vulnerability in util-linux chfn and chsh utilities that allows unprivileged users to read root-owned files. This article covers technical details, affected versions, and mitigation.

Published: February 17, 2026

CVE-2022-0563 Overview

A flaw was found in the util-linux chfn and chsh utilities when compiled with Readline support. The Readline library uses an INPUTRC environment variable to get a path to the library config file. When the library cannot parse the specified file, it prints an error message containing data from the file. This flaw allows an unprivileged user to read root-owned files, potentially leading to privilege escalation. This flaw affects util-linux versions prior to 2.37.4.

Critical Impact

Unprivileged local users can leverage setuid binaries (chfn/chsh) to read contents of arbitrary root-owned files, potentially exposing sensitive system credentials and configuration data that could facilitate privilege escalation.

Affected Products

  • Kernel util-linux (versions prior to 2.37.4)
  • NetApp ONTAP Select Deploy Administration Utility

Discovery Timeline

  • 2022-02-21 - CVE-2022-0563 published to NVD
  • 2025-06-09 - Last updated in NVD database

Technical Details for CVE-2022-0563

Vulnerability Analysis

This vulnerability is classified under CWE-209 (Generation of Error Message Containing Sensitive Information). The core issue resides in how the GNU Readline library handles configuration file parsing errors when invoked by setuid programs like chfn and chsh.

When util-linux is compiled with Readline support, the chfn (change finger information) and chsh (change shell) utilities inherit Readline's behavior of reading configuration from a file specified by the INPUTRC environment variable. Since these utilities run with elevated privileges (setuid root), an attacker can set INPUTRC to point to any file on the system. When Readline encounters parsing errors in the specified file, it outputs error messages that include portions of the file content.

This creates an information disclosure primitive where an unprivileged user can read arbitrary files owned by root by pointing INPUTRC to sensitive files such as /etc/shadow, private SSH keys, or other protected configuration files. The attack requires local access but no special privileges beyond what a standard user possesses.

Root Cause

The root cause is the unsafe interaction between environment variable handling and setuid privilege boundaries. Specifically:

  1. The INPUTRC environment variable is not sanitized or ignored when the program runs with elevated privileges
  2. The Readline library outputs file contents in error messages when it fails to parse a configuration file
  3. The setuid chfn and chsh utilities maintain access to attacker-controlled environment variables while executing with root privileges

This violates the principle that setuid programs should sanitize their environment and avoid leaking privileged information through error messages.

Attack Vector

The attack is executed locally and requires low privileges. An attacker with a standard user account can exploit this vulnerability by manipulating the INPUTRC environment variable before invoking the vulnerable setuid binaries.

The exploitation technique involves setting INPUTRC to point to a sensitive file (such as /etc/shadow or private key files), then executing chfn or chsh. The Readline library, running with root privileges inherited from the setuid binary, attempts to parse the targeted file. When parsing fails, Readline outputs error messages containing portions of the file content, which the attacker can capture from the terminal output.

This allows line-by-line exfiltration of sensitive system files. The attacker could potentially extract password hashes from /etc/shadow, read SSH private keys, or access other confidential system configuration files that would normally be inaccessible to unprivileged users.

Detection Methods for CVE-2022-0563

Indicators of Compromise

  • Unusual execution patterns of chfn or chsh binaries with custom INPUTRC environment variables
  • Error messages in system logs containing unexpected file content from sensitive system files
  • Multiple invocations of chfn/chsh from the same user in rapid succession without legitimate use case
  • Process execution with INPUTRC pointing to sensitive files like /etc/shadow, /root/.ssh/*, or similar

Detection Strategies

  • Monitor process execution for chfn and chsh with environment variable logging enabled to detect suspicious INPUTRC values
  • Implement auditd rules to track access to sensitive files through unexpected processes
  • Configure syslog monitoring for Readline parsing error messages that may contain sensitive data
  • Deploy endpoint detection to identify patterns of environment variable manipulation preceding setuid binary execution

Monitoring Recommendations

  • Enable process accounting and audit logging for all setuid binary executions on critical systems
  • Configure file integrity monitoring on sensitive files like /etc/shadow to detect unusual read access patterns
  • Review authentication logs for any indicators of credential harvesting following suspected exploitation
  • Establish baseline behavior for chfn and chsh usage and alert on anomalous patterns

How to Mitigate CVE-2022-0563

Immediate Actions Required

  • Upgrade util-linux to version 2.37.4 or later on all affected systems
  • Review systems for util-linux installations compiled with Readline support using ldd /usr/bin/chfn | grep readline
  • Audit system logs for potential prior exploitation attempts involving chfn or chsh
  • Consider temporarily restricting access to chfn and chsh if immediate patching is not possible

Patch Information

The vulnerability is addressed in util-linux version 2.37.4 and later. System administrators should update their util-linux packages through their distribution's package manager. For detailed technical discussion of the fix, refer to the Kernel Mailing List Discussion.

Gentoo Linux users should consult Gentoo GLSA 2024-08 for distribution-specific guidance. NetApp customers running ONTAP Select Deploy Administration Utility should refer to NetApp Security Advisory NTAP-20220331-0002 for update instructions.

Workarounds

  • Recompile util-linux without Readline support as a temporary measure using ./configure --without-readline
  • Remove setuid permissions from chfn and chsh binaries using chmod u-s /usr/bin/chfn /usr/bin/chsh (note: this disables user self-service for these functions)
  • Implement AppArmor or SELinux policies to restrict environment variable inheritance for setuid binaries
  • Use filesystem access controls to limit which users can execute chfn and chsh
bash
# Example: Remove setuid bit from vulnerable binaries (temporary workaround)
chmod u-s /usr/bin/chfn /usr/bin/chsh

# Verify util-linux version
chfn --version

# Check if compiled with Readline support
ldd /usr/bin/chfn | grep -i readline

# Update util-linux on Debian/Ubuntu
apt update && apt install util-linux

# Update util-linux on RHEL/CentOS
yum update util-linux

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechUtil Linux

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-209
  • Technical References
  • Kernel Mailing List Discussion

  • Gentoo GLSA 2024-08

  • NetApp Security Advisory NTAP-20220331-0002
  • Related CVEs
  • CVE-2026-27456: util-linux Privilege Escalation Flaw

  • CVE-2026-3184: util-linux Auth Bypass Vulnerability

  • CVE-2021-3995: Kernel Util-linux DOS 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