# CVE-2023-29491: Memory corruption in n/a

> Local attackers can trigger memory corruption in setuid applications using ncurses via malformed terminfo data, potentially leading to privilege escalation.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Apr 2023
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2023-29491, ALSA-2023:5249, ALSA-2023:6698, AZL-26241, CLEANSTART-2026-JO18362, CLSA-2025-1739387560, DEBIAN-CVE-2023-29491, GHSA-vh2x-5rx6-qqhv, JLSEC-2026-453, MGASA-2024-0065, OESA-2023-1426, RHSA-2023:5249, RHSA-2023:6698, RHSA-2023:7361, RHSA-2024:0416, SUSE-SU-2023:2111-1, SUSE-SU-2023:2112-1, UBUNTU-CVE-2023-29491

## What is CVE-2023-29491?

CVE-2023-29491 is a high-severity memory corruption vulnerability in n/a, published on 14 Apr 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

ncurses before 6.4 20230408, when used by a setuid application, allows local users to trigger security-relevant memory corruption via malformed data in a terminfo database file that is found in $HOME/.terminfo or reached via the TERMINFO or TERM environment variable.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2023-29491?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ncurses` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-base` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-c++-libs` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-compat-libs` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-devel` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-libs` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses-term` | AlmaLinux:8 | All versions | 6.1-9.20180224.el8_8.1 |
| `ncurses` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses-base` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses-c++-libs` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses-devel` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses-libs` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses-term` | AlmaLinux:9 | All versions | 6.2-10.20210508.el9 |
| `ncurses` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-base` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-c++-libs` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-c++-libs-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-compat-libs` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-compat-libs-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-devel` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-libs` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-libs-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-term` | Red Hat:enterprise_linux:8::baseos | All versions | 0:6.1-9.20180224.el8_8.1 |
| `ncurses-c++-libs` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-c++-libs-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-compat-libs-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-libs-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-term` | Red Hat:enterprise_linux:9::appstream | All versions | 0:6.2-10.20210508.el9 |
| `ncurses` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-base` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-c++-libs-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-compat-libs-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |
| `ncurses-libs` | Red Hat:enterprise_linux:9::baseos | All versions | 0:6.2-10.20210508.el9 |

Products: Invisible-Island Ncurses.

## How do I fix CVE-2023-29491?

Upgrade to a fixed version.

## Is CVE-2023-29491 being exploited?

There is no known exploitation of CVE-2023-29491 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2017-10684](https://insights.sbomify.com/CVE-2017-10684/): Memory corruption in n/a (critical 9.8)
- [CVE-2017-10685](https://insights.sbomify.com/CVE-2017-10685/): Code injection in n/a (critical 9.8)
- [CVE-2017-16879](https://insights.sbomify.com/CVE-2017-16879/): Memory corruption in n/a (high 7.8)
- [CVE-2017-13728](https://insights.sbomify.com/CVE-2017-13728/): Denial of service in n/a (high 7.5)
- [CVE-2017-11112](https://insights.sbomify.com/CVE-2017-11112/): Denial of service in n/a (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-29491 and fix it if it is affected.

What it is: CVE-2023-29491 is a high-severity memory corruption vulnerability in n/a, published on 14 Apr 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-29491 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-29491/ (Markdown: https://insights.sbomify.com/CVE-2023-29491/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-29491
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-29491
- OSV: https://osv.dev/vulnerability/CVE-2023-29491

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-29491/
Summaries are generated and may contain mistakes; the official description above is the record.
