Junglewise Threat Intelligence

CVE-2025-69720: GNU ncurses stack buffer overflow in infocmp

CVE-2025-69720 · Severity: high · CVSS 7.3 · Published 2026-03-19

Vendors: Gnu.

Executive brief

ncurses is a widely used software library that allows developers to write text-based user interfaces in a terminal-independent manner. A vulnerability in its 'infocmp' utility could allow an attacker to crash the tool or potentially execute unauthorized code if a user is tricked into processing a specially crafted terminal description file. This could lead to a local denial of service or a compromise of the user's terminal session.

Technical details

A stack-based buffer overflow exists in the 'infocmp' utility of ncurses within the 'analyze_string' function in 'progs/infocmp.c'. The vulnerability is triggered when the '-i' flag is used to inspect CSI sequences in a terminfo entry. The routine copies a candidate substring into a fixed-size 4096-byte stack buffer ('buf2') using 'strncpy' without verifying that the source string length is within the buffer's bounds. An attacker can exploit this by providing a maliciously long CSI parameter list (e.g., a crafted SGR sequence), leading to a stack smash. This can result in a local denial of service (crash) or potentially arbitrary code execution. The issue was addressed in the ncurses 6.5-20251213 patch.

Affected products

  • GNU ncurses 6.4, 6.5 before patch 20251213

Timeline

  • 2025-12-13: patched: Official patch released in ncurses 6.5-20251213.
  • 2026-03-19: disclosed: CVE-2025-69720 published.

References