Cloudanix VulnDB

CVE-2017-13731

Medium · 6.5

CVSS

6.5

EPSS

2.9%

Published

Aug 29, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in a widely used screen-handling library can let attackers crash programs by feeding them bad terminal data, causing temporary loss of whatever service those programs provide.

Exploit Available
Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Moderate
Impact
Denial Of Service
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Illegal address access during termcap string post-processing in parse_entry.c triggers memory corruption that crashes the process.

Why it matters to the business

Applications relying on ncurses for terminal handling can be forced offline, interrupting services that depend on them; the issue is long-public with public exploits but has not appeared in widespread ransomware campaigns.

How an attack unfolds

An attacker supplies crafted termcap data that reaches postprocess_termcap(); the resulting illegal memory access crashes the ncurses-using process, achieving denial of service. Public exploits exist and require user interaction such as processing attacker-controlled input files or terminal descriptions.

How to fix it

Upgrade affected packages to the versions that contain the fix; for configmap-reload-fips-0.11 update to 0.11.1-r3 or later. Rebuild or redeploy any statically linked binaries that embed the vulnerable ncurses code.

How to confirm the fix worked

Confirm ncurses version is 6.0 patched or later; run available proof-of-concept inputs that previously triggered the crash and verify the process no longer terminates abnormally.

Typical attack path

  1. Identify a target application that links against vulnerable ncurses and processes external termcap or terminal description input
  2. Craft malicious termcap data that triggers the illegal address access in postprocess_termcap()
  3. Deliver the data to the target (file, environment variable, or remote input requiring user interaction)
  4. Observe process crash and service unavailability

How to detect it

Review application logs for segmentation faults or aborts occurring inside ncurses termcap parsing routines; correlate with any recent introduction of new terminal description files or environment variables.

What your security team should do

  • Apply the listed fixed package versions immediately on all affected systems
  • Scan build pipelines and container images for any remaining references to ncurses 6.0
  • Monitor for application crashes correlated with termcap parsing activity
  • Prioritize patching on internet-facing or multi-tenant systems first

The record

There is an illegal address access in the function postprocess_termcap() in parse_entry.c in ncurses 6.0 that 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