CVE-2021-3903
vim: heap-based buffer overflow vulnerability
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · October 24, 2021
Updated · August 6, 2026
Description
vim is vulnerable to Heap-based Buffer Overflow
Statement
This flaw is marked as Low Impact because it requires a user to run an untrusted/malicious Vim script using the -s option at the command line. Untrusted Vim scripts should never be run as they can already execute arbitrary shell commands. The security issue raised by this flaw would be no worse than what is already possible when running untrusted Vim scripts.
Vim as shipped in Red Hat Enterprise Linux 8 is not affected by this flaw. The flaw is out of support scope for Red Hat Enterprise Linux 6 and 7.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Do not run untrusted vim scripts with -s {scriptin} as it is never safe to do so.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CWE-125 · Out-of-bounds Read