CVE-2017-13728
High · 7.5CVSS
7.5
EPSS
3.9%
Published
Aug 29, 2017
CISA due date
—
Cloudanix analysis
A flaw in a common terminal-handling library lets attackers send specially made data that freezes programs and makes systems unresponsive until restarted.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Infinite loop in the next_char function within libtic causes unbounded CPU consumption when processing crafted input, resulting in denial of service with no confidentiality or integrity impact.
Why it matters to the business
Systems processing untrusted terminal or terminfo data experience prolonged unavailability and resource exhaustion; the vulnerability has been public for over nine years with available exploits but remains unexploited in the wild according to known catalogs.
How an attack unfolds
An attacker supplies a maliciously crafted input file or stream to any process linked against the vulnerable ncurses libtic; the parser enters an infinite loop in next_char, exhausting CPU and denying service to legitimate users.
How to fix it
Upgrade affected packages to the versions containing the fix; for kubernetes-csi-external-attacher-fips-4.4 (Chainguard) update to 4.4.4-r4 or later. Rebuild any containers or images that embed the vulnerable ncurses library and restart affected services.
How to confirm the fix worked
Verify the installed ncurses version is at or above the fixed release, then attempt to process a known triggering input in a controlled environment while confirming the process terminates rather than looping.
Typical attack path
- Identify a network-accessible service or utility that invokes ncurses terminfo parsing on untrusted input
- Craft a minimal malformed input that triggers the next_char loop
- Deliver the input over the network or via file upload
- Observe sustained high CPU usage and service degradation
How to detect it
Monitor for processes linked to libtic or ncurses consuming near-100 % CPU for extended periods; inspect logs from services that parse terminfo or terminal capability data for sudden hangs or high resource alerts.
What your security team should do
- Apply the listed package upgrades immediately given the public exploit availability
- Scan container images and build pipelines for any embedded ncurses 6.0 binaries
- Add runtime CPU and process monitoring to detect anomalous sustained utilization
- Review dependencies to identify any additional downstream packages still shipping the vulnerable library
The record
There is an infinite loop in the next_char function in comp_scan.c in ncurses 6.0, related to libtic. A crafted input will lead to a remote denial of service attack.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.3 | ncurses | 0 | 6.0_p20170701-r0 |
| Alpine:v3.4 | ncurses | 0 | 6.0_p20170701-r0 |
| Alpine:v3.5 | ncurses | 0 | 6.0_p20170701-r0 |
| Alpine:v3.6 | ncurses | 0 | 6.0_p20170930-r0 |
| Debian:11 | ncurses | 0 | 6.0+20170827-1 |
| Debian:12 | ncurses | 0 | 6.0+20170827-1 |
| Debian:13 | ncurses | 0 | 6.0+20170827-1 |
| Mageia:6 | ncurses | 0 | 6.0-8.1.mga6 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Server 11 SP4 | ncurses | 0 | 5.6-93.12.1 |
| SUSE:Linux Enterprise Server 12 SP2 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Server 12 SP2 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Server 12 SP3 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Server 12 SP3 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | ncurses | 0 | 5.6-93.12.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | ncurses | 0 | 5.6-93.12.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | ncurses | 0 | 5.9-58.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | ncurses | 0 | 5.9-55.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | ncurses | 0 | 5.9-58.1 |
| Ubuntu:18.04:LTS | ncurses | 0 | 6.1-1ubuntu1 |
| Ubuntu:Pro:14.04:LTS | ncurses | 0 | 5.9+20140118-1ubuntu1+esm1 |
| Ubuntu:Pro:16.04:LTS | ncurses | 0 | 6.0+20160213-1ubuntu1+esm1 |
Related vulnerabilities
- CVE-2017-13729 There is an illegal address access in the _nc_save_str function in alloc_entry.c in… Also affects ncurses
- CVE-2017-13733 There is an illegal address access in the fmt_entry function in progs/dump_entry.c in… Also affects ncurses
- CVE-2017-13734 There is an illegal address access in the _nc_safe_strcat function in strings.c in… Also affects ncurses
- CVE-2017-13730 There is an illegal address access in the function _nc_read_entry_source() in progs/tic.c… Also affects ncurses
- CVE-2017-13731 There is an illegal address access in the function postprocess_termcap() in parse_entry.c… Also affects ncurses
- CVE-2017-13732 There is an illegal address access in the function dump_uses() in progs/dump_entry.c in… Also affects ncurses
- CVE-2017-11112 In ncurses 6.0, there is an attempted 0xffffffffffffffff access in the append_acs… Also affects ncurses
- CVE-2017-11113 In ncurses 6.0, there is a NULL Pointer Dereference in the _nc_parse_entry function of… Also affects ncurses