Every CVE Search/ Get API key

CVE-2021-39537

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based...

8.8 HighFix available

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

3.24%Up 2.8 points since Sep 21, 2021
90%50%10%1%

What each source reports

NVD Score used 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-787
Updated
2026-11-02
CVE List No score

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
CVE-2021-39537
Updated
2026-11-02
EUVDEUVD-2021-25894 No score

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
EUVD-2021-25894
Updated
2026-11-02
GitHub AdvisoriesGHSA-v5gv-3mwr-6223 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based...

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
GHSA-v5gv-3mwr-6223
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-787
Updated
2026-11-02
OSVALPINE-CVE-2021-39537 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
ALPINE-CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-6740 8.8

CVE-2021-39537 affecting package ncurses for versions less than 6.2-6

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
AZL-6740
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 14 moreShow less
OSVBELL-CVE-2021-39537 8.8

CVE-2021-39537 does not affect BellSoft software

Record
BELL-CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-39537 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
DEBIAN-CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVJLSEC-2026-451 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
JLSEC-2026-451
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Updated
2026-11-02
OSVOESA-2021-1386 7.5

ncurses security update

The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SVr4-curses enhancements over BSD curses. SVr4 curses became the basis of X/Open Curses.

Security Fix(es):

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.(CVE-2021-39537)

Record
OESA-2021-1386
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-39537 8.8

An issue was discovered in ncurses through v6.2-1. _nc_captoinfo in captoinfo.c has a heap-based buffer overflow.

Record
UBUNTU-CVE-2021-39537
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2024-1710789286 No score

ncurses: Fix of 2 CVEs

  • CVE-2023-29491.patch: Mitigate vulnerability by building the packages with modified --disable-root-environ option which now limits usage of environment for setuid/setgid programs only
  • CVE-2021-39537.patch: Add a check for end-of-string in cvtchar to handle a malformed string in infotocap
Record
CLSA-2024-1710789286
Updated
2026-11-02
OSVCLSA-2026-1792806631 No score

ncurses: Fix of 2 CVEs

  • CVE-2021-39537: fix heap buffer overflow in _nc_captoinfo() with a crafted termcap entry
  • CVE-2023-29491: ignore terminfo/termcap environment variables in setuid/setgid programs (--disable-root-environ)
Record
CLSA-2026-1792806631
Updated
2026-11-02
OSVopenSUSE-SU-2021:1417-1 No score

Security update for ncurses

This update for ncurses fixes the following issues:

  • CVE-2021-39537: Fixed an heap-based buffer overflow in _nc_captoinfo. (bsc#1190793)

This update was imported from the SUSE:SLE-15:Update update project.

Record
openSUSE-SU-2021:1417-1
Updated
2026-11-02
OSVopenSUSE-SU-2021:3490-1 No score

Security update for ncurses

This update for ncurses fixes the following issues:

  • CVE-2021-39537: Fixed an heap-based buffer overflow in _nc_captoinfo. (bsc#1190793)
Record
openSUSE-SU-2021:3490-1
Updated
2026-11-02
OSVSUSE-SU-2021:3490-1 No score

Security update for ncurses

This update for ncurses fixes the following issues:

  • CVE-2021-39537: Fixed an heap-based buffer overflow in _nc_captoinfo. (bsc#1190793)
Record
SUSE-SU-2021:3490-1
Updated
2026-11-02
OSVSUSE-SU-2021:3491-1 No score

Security update for ncurses

This update for ncurses fixes the following issues:

  • CVE-2021-39537: Fixed an heap-based buffer overflow in _nc_captoinfo. (bsc#1190793)
Record
SUSE-SU-2021:3491-1
Updated
2026-11-02
OSVUSN-5477-1 No score

ncurses vulnerabilities

Hosein Askari discovered that ncurses was incorrectly performing memory management operations when dealing with long filenames while writing structures into the file system. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2017-16879)

Chung-Yi Lin discovered that ncurses was incorrectly handling access to invalid memory areas when parsing terminfo or termcap entries where the use-name had invalid syntax. An attacker could possibly use this issue to cause a denial of service. (CVE-2018-19211)

It was discovered that ncurses was incorrectly performing bounds checks when processing invalid hashcodes. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. (CVE-2019-17594)

It was discovered that ncurses was incorrectly handling end-of-string characters when processing terminfo and termcap files. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. (CVE-2019-17595)

It was discovered that ncurses was incorrectly handling end-of-string characters when converting between termcap and terminfo formats. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. (CVE-2021-39537)

It was discovered that ncurses was incorrectly performing bounds checks when dealing with corrupt terminfo data while reading a terminfo file. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. (CVE-2022-29458)

Record
USN-5477-1
Updated
2026-11-02
OSVUSN-6099-1 No score

ncurses vulnerabilities

It was discovered that ncurses was incorrectly performing bounds checks when processing invalid hashcodes. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. This issue only affected Ubuntu 18.04 LTS. (CVE-2019-17594)

It was discovered that ncurses was incorrectly handling end-of-string characters when processing terminfo and termcap files. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. This issue only affected Ubuntu 18.04 LTS. (CVE-2019-17595)

It was discovered that ncurses was incorrectly handling end-of-string characters when converting between termcap and terminfo formats. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-39537)

It was discovered that ncurses was incorrectly performing bounds checks when dealing with corrupt terminfo data while reading a terminfo file. An attacker could possibly use this issue to cause a denial of service or to expose sensitive information. This issue only affected Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2022-29458)

It was discovered that ncurses was parsing environment variables when running with setuid applications and not properly handling the processing of malformed data when doing so. A local attacker could possibly use this issue to cause a denial of service (application crash) or execute arbitrary code. (CVE-2023-29491)

Record
USN-6099-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
ncurses
Alpine:v3.12
before 6.2_p20200523-r1
6.2_p20200523-r1
ncurses
Alpine:v3.13
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.14
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.15
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.16
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.17
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.18
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.19
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.20
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.21
before 6.2_p20200530-r0
6.2_p20200530-r0
Show 47 moreShow less
Affected packages
PackageAffectedFixed
ncurses
Alpine:v3.22
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.23
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Alpine:v3.24
before 6.2_p20200530-r0
6.2_p20200530-r0
ncurses
Azure Linux:2
before 6.2-6
6.2-6
ncurses
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses-base
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses-devel
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses-libs
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses-static
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses-term
TuxCare:CentOS:7
From an advisory covering 2 CVEs
before 5.9-14.20130511.el7_4.tuxcare.els1
5.9-14.20130511.el7_4.tuxcare.els1
ncurses
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses-base
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses-devel
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses-libs
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses-static
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses-term
TuxCare:OracleLinux:6
From an advisory covering 2 CVEs
before 5.7-4.20090207.el6.tuxcare.els1
5.7-4.20090207.el6.tuxcare.els1
ncurses
Debian:12
before 6.2+20200912-1
6.2+20200912-1
ncurses
Debian:13
before 6.2+20200912-1
6.2+20200912-1
ncurses
Debian:14
before 6.2+20200912-1
6.2+20200912-1
ncurses
Debian:10
From an advisory covering 2 CVEs
before 6.1+20181013-2+deb10u5, plus listed versions
6.1+20181013-26.1+20181013-2+deb10u16.1+20181013-2+deb10u26.1+20181013-2+deb10u36.1+20181013-2+deb10u4
6.1+20181013-2+deb10u5
Ncurses_jll
Julia
before 6.4.0+0
6.4.0+0
ncurses
openEuler:20.03-LTS-SP1
before 6.2-2.oe1
6.2-2.oe1
ncurses
openEuler:20.03-LTS-SP2
before 6.2-2.oe1
6.2-2.oe1
ncurses
SUSE:Linux Enterprise Module for Basesystem 15 SP2
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Module for Basesystem 15 SP3
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Module for Development Tools 15 SP2
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Module for Development Tools 15 SP3
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Module for Legacy 15 SP2
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Module for Legacy 15 SP3
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Micro 5.0
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Micro 5.1
before 6.1-5.9.1
6.1-5.9.1
ncurses
SUSE:Linux Enterprise Software Development Kit 12 SP5
before 5.9-75.1
5.9-75.1
ncurses
SUSE:Linux Enterprise Server 12 SP5
before 5.9-75.1
5.9-75.1
ncurses
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 5.9-75.1
5.9-75.1
ncurses
Ubuntu:Pro:14.04:LTS
before 5.9+20140118-1ubuntu1+esm2, plus listed versions
5.9+20130608-1ubuntu15.9+20131221-1ubuntu15.9+20140118-1ubuntu15.9+20140118-1ubuntu1+esm1
5.9+20140118-1ubuntu1+esm2
ncurses
Ubuntu:Pro:16.04:LTS
before 6.0+20160213-1ubuntu1+esm2, plus listed versions
5.9+20150516-2ubuntu16.0+20151024-2ubuntu16.0+20151024-2ubuntu26.0+20160213-1ubuntu16.0+20160213-1ubuntu1+esm1
6.0+20160213-1ubuntu1+esm2
ncurses
Ubuntu:18.04:LTS
before 6.1-1ubuntu1.18.04.1, plus listed versions
6.0+20160625-1ubuntu16.0+20171125-1ubuntu16.1-1ubuntu16.1-1ubuntu1.18.04
6.1-1ubuntu1.18.04.1
ncurses
Ubuntu:20.04:LTS
before 6.2-0ubuntu2.1, plus listed versions
6.1+20190803-1ubuntu16.1+20191019-1ubuntu16.2-0ubuntu2
6.2-0ubuntu2.1
ncurses
Ubuntu:Pro:14.04:LTS
From an advisory covering 6 CVEs
before 5.9+20140118-1ubuntu1+esm2, plus listed versions
5.9+20130608-1ubuntu15.9+20131221-1ubuntu15.9+20140118-1ubuntu15.9+20140118-1ubuntu1+esm1
5.9+20140118-1ubuntu1+esm2
ncurses
Ubuntu:Pro:16.04:LTS
From an advisory covering 6 CVEs
before 6.0+20160213-1ubuntu1+esm2, plus listed versions
5.9+20150516-2ubuntu16.0+20151024-2ubuntu16.0+20151024-2ubuntu26.0+20160213-1ubuntu16.0+20160213-1ubuntu1+esm1
6.0+20160213-1ubuntu1+esm2
ncurses
Ubuntu:Pro:14.04:LTS
From an advisory covering 5 CVEs
before 5.9+20140118-1ubuntu1+esm3, plus listed versions
5.9+20130608-1ubuntu15.9+20131221-1ubuntu15.9+20140118-1ubuntu15.9+20140118-1ubuntu1+esm15.9+20140118-1ubuntu1+esm2
5.9+20140118-1ubuntu1+esm3
ncurses
Ubuntu:Pro:16.04:LTS
From an advisory covering 5 CVEs
before 6.0+20160213-1ubuntu1+esm3, plus listed versions
5.9+20150516-2ubuntu16.0+20151024-2ubuntu16.0+20151024-2ubuntu26.0+20160213-1ubuntu16.0+20160213-1ubuntu1+esm16.0+20160213-1ubuntu1+esm2
6.0+20160213-1ubuntu1+esm3
ncurses
Ubuntu:18.04:LTS
From an advisory covering 5 CVEs
before 6.1-1ubuntu1.18.04.1, plus listed versions
6.0+20160625-1ubuntu16.0+20171125-1ubuntu16.1-1ubuntu16.1-1ubuntu1.18.04
6.1-1ubuntu1.18.04.1
ncurses
Ubuntu:20.04:LTS
From an advisory covering 5 CVEs
before 6.2-0ubuntu2.1, plus listed versions
6.1+20190803-1ubuntu16.1+20191019-1ubuntu16.2-0ubuntu2
6.2-0ubuntu2.1
ncurses
Ubuntu:22.04:LTS
From an advisory covering 5 CVEs
before 6.3-2ubuntu0.1, plus listed versions
6.2+20201114-2build16.2+20201114-2build26.3-16.3-2
6.3-2ubuntu0.1
ncurses
openSUSE:Leap 15.2
before 6.1-lp152.8.3.1
6.1-lp152.8.3.1
ncurses
openSUSE:Leap 15.3
before 6.1-5.9.1
6.1-5.9.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-39537 is a high vulnerability (CVSS 8.8) in Invisible-island Ncurses, published September 20, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.24%, the 88th percentile. Fixed in ncurses 6.2_p20200523-r1.

References

Show 31 moreShow less
MoveEnter Open