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-2023-29491

CVE-2023-29491: Gnu Ncurses Privilege Escalation Flaw

CVE-2023-29491 is a privilege escalation vulnerability in Gnu Ncurses affecting versions before 6.4 20230408. Local users can exploit malformed terminfo data to trigger memory corruption in setuid applications.

Published: January 28, 2026

CVE-2023-29491 Overview

CVE-2023-29491 is a memory corruption vulnerability affecting GNU ncurses versions prior to 6.4 20230408. When ncurses is used by a setuid application, local users can trigger security-relevant memory corruption by crafting malformed data in a terminfo database file. The malicious terminfo file can be placed in $HOME/.terminfo or accessed through the TERMINFO or TERM environment variables, allowing attackers to potentially escalate privileges on affected systems.

Critical Impact

Local attackers can exploit this vulnerability to achieve privilege escalation through memory corruption in setuid applications that utilize the ncurses library, potentially gaining elevated system access.

Affected Products

  • GNU ncurses versions before 6.4 20230408
  • Apple macOS systems (addressed in HT213843, HT213844, HT213845)
  • Multiple Linux distributions including Debian and Fedora

Discovery Timeline

  • April 14, 2023 - CVE-2023-29491 published to NVD
  • November 4, 2025 - Last updated in NVD database

Technical Details for CVE-2023-29491

Vulnerability Analysis

This vulnerability is classified as CWE-787 (Out-of-Bounds Write), indicating that the ncurses library fails to properly validate data when parsing terminfo database files. The ncurses library is a widely-used terminal handling library that manages screen output and keyboard input for text-based applications. When processing terminfo files, the library reads terminal capability descriptions that define how a terminal emulator should behave.

The core issue lies in how ncurses handles malformed entries within terminfo database files. An attacker with local access can craft a specially constructed terminfo file containing malicious data that, when parsed by a setuid application using ncurses, triggers out-of-bounds memory writes. This memory corruption can potentially be leveraged to hijack program execution flow.

Root Cause

The root cause of this vulnerability is insufficient input validation when the ncurses library parses terminfo database files. The library trusts user-controllable terminfo files located in $HOME/.terminfo or specified via environment variables (TERMINFO, TERM) without adequate bounds checking. When processing these files, malformed capability strings or numeric values can cause the library to write data beyond allocated buffer boundaries, leading to memory corruption.

Attack Vector

The attack requires local access to the target system. An attacker can exploit this vulnerability through the following mechanism:

  1. The attacker creates a malicious terminfo database file with specially crafted malformed data
  2. The file is placed in $HOME/.terminfo or the attacker manipulates the TERMINFO or TERM environment variables to point to the malicious file
  3. When a setuid application that uses ncurses is executed, it loads and parses the malicious terminfo data
  4. The malformed data triggers out-of-bounds memory writes during parsing
  5. The attacker can potentially leverage this memory corruption to escalate privileges through the setuid application

The attack surface is particularly concerning because ncurses is ubiquitous in Unix-like operating systems, and many system utilities with elevated privileges depend on it for terminal handling.

Detection Methods for CVE-2023-29491

Indicators of Compromise

  • Unusual or suspicious terminfo files appearing in user home directories ($HOME/.terminfo/)
  • Unexpected modifications to the TERMINFO or TERM environment variables in user sessions
  • Crash logs or core dumps from setuid applications involving ncurses library functions
  • Signs of privilege escalation attempts following ncurses library loading failures

Detection Strategies

  • Monitor file system activity for creation or modification of terminfo database files in user-writable locations
  • Implement endpoint detection rules to identify setuid applications crashing with memory corruption signatures
  • Audit environment variable manipulation, particularly TERMINFO and TERM, in security-sensitive contexts
  • Deploy SentinelOne Singularity Platform to detect exploitation attempts through behavioral analysis of privilege escalation patterns

Monitoring Recommendations

  • Enable file integrity monitoring on system terminfo directories and user home directories
  • Configure logging for setuid application crashes and analyze for patterns indicating exploitation attempts
  • Monitor system calls related to terminfo file access from privileged processes
  • Utilize SentinelOne's runtime protection to identify anomalous memory access patterns in applications using ncurses

How to Mitigate CVE-2023-29491

Immediate Actions Required

  • Update GNU ncurses to version 6.4 20230408 or later immediately
  • Apply vendor-specific patches from your operating system distributor (Debian, Fedora, Apple, NetApp)
  • Audit systems for setuid applications that depend on ncurses and prioritize patching accordingly
  • Review user home directories for suspicious terminfo files

Patch Information

The vulnerability has been addressed in ncurses version 6.4 dated April 8, 2023. The fix is documented in the MIT ncurses Commit Log. Multiple vendors have released patches including:

  • Debian: Security advisory available via Debian LTS Security Announcement
  • Fedora: Package updates available via Fedora Package Announcement
  • Apple: Patches included in macOS updates documented in Apple Support Document HT213843, HT213844, and HT213845
  • NetApp: Advisory available at NetApp Security Advisory NTAP-20230517-0009

Workarounds

  • Restrict write access to user terminfo directories on sensitive systems with setuid applications
  • Configure setuid applications to use only system-wide terminfo databases in trusted locations
  • Implement mandatory access control (SELinux/AppArmor) policies to prevent terminfo file manipulation
  • Consider removing setuid bits from applications where elevated privileges are not strictly required
bash
# Configuration example
# Restrict terminfo lookup to system directories only
export TERMINFO=/usr/share/terminfo
export TERMINFO_DIRS=/usr/share/terminfo

# Remove user-writable terminfo directories (use with caution)
# chmod 000 $HOME/.terminfo

# Verify ncurses version
ncurses6-config --version 2>/dev/null || ncurses5-config --version

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechGnu Ncurses

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.07%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-787
  • Technical References
  • MIT ncurses Commit Log

  • OpenWall OSS Security Message 11

  • Debian LTS Security Announcement

  • Fedora Package Announcement

  • NetApp Security Advisory NTAP-20230517-0009

  • Apple Support Document HT213843

  • Apple Support Document HT213844

  • Apple Support Document HT213845

  • OpenWall OSS Security Message 5

  • Fedora Package Announcement
  • Vendor Resources
  • OpenWall OSS Security Message 10

  • OpenWall OSS Security Message 4
  • Related CVEs
  • CVE-2022-29458: GNU Ncurses Buffer Overflow Vulnerability
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