cve.bz

CVE-2024-43790 Heap-based Buffer Overflow

5.5 mediumEPSS 0.3%Fix available

Medium (5.5). EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 24th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-08-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-122 Heap-based Buffer Overflow
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-43790 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-43790?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-43790?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-43790 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
vim:vimfrom 9.1.0425 before 9.1.0689

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12vimno fix listedDEBIAN-CVE-2024-43790
Debian13, 14vim2:9.1.0698-1DEBIAN-CVE-2024-43790
SUSELinux Enterprise Micro 5.1, Linux Enterprise Micro 5.2, Linux Enterprise Micro 5.3 and 1 morevim9.1.1101-150000.5.69.1SUSE-SU-2025:0724-1
SUSELinux Enterprise Micro 5.5, Linux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Desktop Applications 15 SP6vim9.1.1101-150500.20.21.1SUSE-SU-2025:0723-1
SUSELinux Enterprise Server LTSS Extended Security 12 SP5vim9.1.1101-17.41.1SUSE-SU-2025:0722-1
SUSELinux Micro 6.0vim9.1.1101-1.1SUSE-SU-2025:20128-1
openSUSELeap 15.6vim9.1.1101-150500.20.21.1SUSE-SU-2025:0723-1
Alpinev3.20, v3.21, v3.22 and 2 morevim9.1.0707-r0ALPINE-CVE-2024-43790
Alpaquita23vim9.1.0936-r0BELL-CVE-2024-43790
Alpaquitastreamvim9.1.0707-r0BELL-CVE-2024-43790

From the distributions' data via OSV.dev: the Debian Security Tracker; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · SUSE · openSUSE · Alpine · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Product Security has rated this issue as having a Low security impact because the "victim" has to run an untrusted file IN SCRIPT MODE. Someone who is running untrusted files in script mode is equivalent to someone just taking a random Python script and running it.

For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10vimNot affected
Red Hat Enterprise Linux 6vimOut of support scope
Red Hat Enterprise Linux 7vimOut of support scope
Red Hat Enterprise Linux 8vimNot affected
Red Hat Enterprise Linux 9vimNot affected
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-8Will not fix
Red Hat OpenShift Container Platform 4openshift/ose-rhel-coreos-9Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-43790.

Attack patterns (CAPEC)

  • CAPEC-92 Forced Integer Overflow Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON