CVE-2023-45918
NoneCVSS
—
EPSS
—
Published
Feb 16, 2024
CISA due date
—
Cloudanix analysis
A bug in a widely used library for handling terminal displays can make certain programs stop working if they receive unusual terminal settings.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
NULL pointer dereference in tgetstr within tinfo/lib_termcap.c causes memory corruption and potential application crash when processing certain terminal capability strings.
Why it matters to the business
Applications relying on ncurses for terminal handling may crash unexpectedly, leading to service interruptions and degraded user experience in environments using terminal-based interfaces.
How an attack unfolds
An attacker supplies a crafted terminal description or environment that triggers tgetstr to receive a NULL pointer, resulting in dereference and crash; no public exploitation or threat actor usage is known given the age and lack of KEV status.
How to fix it
Upgrade ncurses to fixed versions such as 6.4+20230625-1 or later on affected platforms; rebuild and redeploy dependent applications after the library update.
How to confirm the fix worked
Confirm ncurses package version meets or exceeds the fixed release, run regression tests exercising tgetstr paths with varied terminal capabilities, and monitor for absence of crashes under load.
Typical attack path
- Identify applications using vulnerable ncurses version for terminal handling
- Craft malicious TERM or terminal capability data
- Trigger tgetstr call with the malformed input
- Cause NULL dereference leading to process crash
How to detect it
Review application crash logs for segmentation faults originating from ncurses tinfo functions; examine core dumps or stack traces referencing lib_termcap.c around tgetstr calls.
What your security team should do
- Prioritize patching ncurses in all environments within standard maintenance windows
- Inventory applications linked against ncurses and schedule upgrades
- Monitor upstream Debian and ncurses release notes for any related issues
The record
ncurses 6.4-20230610 has a NULL pointer dereference in tgetstr in tinfo/lib_termcap.c.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | ncurses | 0 | No fix |
| Debian:12 | ncurses | 0 | No fix |
| Debian:13 | ncurses | 0 | 6.4+20230625-1 |
| SUSE:Linux Enterprise Micro 5.1 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Micro 5.2 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Micro 5.3 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Micro 5.4 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Micro 5.5 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP5 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP5 | ncurses | 0 | 6.1-150000.5.24.1 |
| SUSE:Linux Enterprise Server 12 SP5 | ncurses | 0 | 5.9-88.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | ncurses | 0 | 5.9-88.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP5 | ncurses | 0 | 5.9-88.1 |
| Ubuntu:20.04:LTS | ncurses | 0 | No fix |
| Ubuntu:22.04:LTS | ncurses | 0 | No fix |
| Ubuntu:24.04:LTS | ncurses | 0 | 6.4+20231209-1 |
| Ubuntu:Pro:14.04:LTS | ncurses | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | ncurses | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | ncurses | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | ncurses | 0 | No fix |
| openSUSE:Leap 15.5 | ncurses | 0 | 6.1-150000.5.24.1 |
| openSUSE:Leap Micro 5.3 | ncurses | 0 | 6.1-150000.5.24.1 |
| openSUSE:Leap Micro 5.4 | ncurses | 0 | 6.1-150000.5.24.1 |
Related vulnerabilities
- CVE-2023-50495 NCurse v6.4-20230418 was discovered to contain a segmentation fault via the component… Also affects ncurses
- CVE-2017-16879 Stack-based buffer overflow in the _nc_write_entry function in tinfo/write_entry.c in… Also affects ncurses
- CVE-2017-10684 In ncurses 6.0, there is a stack-based buffer overflow in the fmt_entry function. Also affects ncurses