CVE-2021-39537
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.
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
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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV: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 High
CVSS: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 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
ncursesAlpine:v3.12 |
before 6.2_p20200523-r1 | 6.2_p20200523-r1 |
ncursesAlpine:v3.13 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.14 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.15 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.16 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.17 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.18 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.19 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.20 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.21 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
Show 47 moreShow less
| Package | Affected | Fixed |
|---|---|---|
ncursesAlpine:v3.22 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.23 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAlpine:v3.24 |
before 6.2_p20200530-r0 | 6.2_p20200530-r0 |
ncursesAzure Linux:2 |
before 6.2-6 | 6.2-6 |
ncursesTuxCare: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-baseTuxCare: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-develTuxCare: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-libsTuxCare: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-staticTuxCare: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-termTuxCare: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 |
ncursesTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncurses-baseTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncurses-develTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncurses-libsTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncurses-staticTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncurses-termTuxCare:OracleLinux:6 From an advisory covering 2 CVEs |
before 5.7-4.20090207.el6.tuxcare.els1 | 5.7-4.20090207.el6.tuxcare.els1 |
ncursesDebian:12 |
before 6.2+20200912-1 | 6.2+20200912-1 |
ncursesDebian:13 |
before 6.2+20200912-1 | 6.2+20200912-1 |
ncursesDebian:14 |
before 6.2+20200912-1 | 6.2+20200912-1 |
ncursesDebian: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_jllJulia |
before 6.4.0+0 | 6.4.0+0 |
ncursesopenEuler:20.03-LTS-SP1 |
before 6.2-2.oe1 | 6.2-2.oe1 |
ncursesopenEuler:20.03-LTS-SP2 |
before 6.2-2.oe1 | 6.2-2.oe1 |
ncursesSUSE:Linux Enterprise Module for Basesystem 15 SP2 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Module for Basesystem 15 SP3 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Module for Development Tools 15 SP2 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Module for Development Tools 15 SP3 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Module for Legacy 15 SP2 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Module for Legacy 15 SP3 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Micro 5.0 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Micro 5.1 |
before 6.1-5.9.1 | 6.1-5.9.1 |
ncursesSUSE:Linux Enterprise Software Development Kit 12 SP5 |
before 5.9-75.1 | 5.9-75.1 |
ncursesSUSE:Linux Enterprise Server 12 SP5 |
before 5.9-75.1 | 5.9-75.1 |
ncursesSUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 5.9-75.1 | 5.9-75.1 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu:20.04:LTS |
before 6.2-0ubuntu2.1, plus listed versions 6.1+20190803-1ubuntu16.1+20191019-1ubuntu16.2-0ubuntu2 |
6.2-0ubuntu2.1 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesUbuntu: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 |
ncursesopenSUSE:Leap 15.2 |
before 6.1-lp152.8.3.1 | 6.1-lp152.8.3.1 |
ncursesopenSUSE:Leap 15.3 |
before 6.1-5.9.1 | 6.1-5.9.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE 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
lists.gnu.org/archive/html/bug-ncurses/2020-08/msg00006.html
lists.gnu.org/archive/html/bug-ncurses/2021-10/msg00023.html
cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/ncurses/patches/patch-ncurses_tinfo_captoinfo.c?rev=1.1&content-type=text/x-cvsweb-markup
support.apple.com/kb/HT213443
support.apple.com/kb/HT213444
support.apple.com/kb/HT213488
Show 31 moreShow less
seclists.org/fulldisclosure/2022/Oct/41
seclists.org/fulldisclosure/2022/Oct/28
seclists.org/fulldisclosure/2022/Oct/43
seclists.org/fulldisclosure/2022/Oct/45
security.netapp.com/advisory/ntap-20230427-0012
lists.debian.org/debian-lts-announce/2023/12/msg00004.html
nvd.nist.gov/vuln/detail/CVE-2021-39537
github.com/advisories/GHSA-v5gv-3mwr-6223
security.alpinelinux.org/vuln/CVE-2021-39537
docs.bell-sw.com/security/cves/CVE-2021-39537
errata.tuxcare.com/centos7-els/CLSA-2024-1710789286.html
errata.tuxcare.com/els_os/oraclelinux6els/CLSA-2026-1792806631.html
nvd.nist.gov/vuln/detail/CVE-2023-29491
security-tracker.debian.org/tracker/CVE-2021-39537
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1386
suse.com/support/update/announcement/2021/suse-su-20213490-1
bugzilla.suse.com/1190793
suse.com/security/cve/CVE-2021-39537
suse.com/support/update/announcement/2021/suse-su-20213491-1
ubuntu.com/security/CVE-2021-39537
ubuntu.com/security/notices/USN-5477-1
ubuntu.com/security/notices/USN-6099-1
cve.org/CVERecord?id=CVE-2021-39537
ubuntu.com/security/CVE-2017-16879
ubuntu.com/security/CVE-2018-19211
ubuntu.com/security/CVE-2019-17594
ubuntu.com/security/CVE-2019-17595
ubuntu.com/security/CVE-2022-29458
ubuntu.com/security/CVE-2023-29491
lists.opensuse.org/archives/list/[email protected]/thread/RTS45TDORJPZD3OEON7W6CTYLNX6KQ3J
lists.opensuse.org/archives/list/[email protected]/thread/2IZOG455BIMQ6NKBIPOWITV4SHIG5YT7