Vulnerability · Published Oct 19, 2021 · Assigned by @huntrdev
CVE-2021-3872Heap-based Buffer Overflow in vim/vim
High 7.8
In plain English
A high-severity heap buffer overflow in vim/vim from vim. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.0)7.8High
Exploit odds (30 days)1.5%top 25.7% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official description
vim is vulnerable to Heap-based Buffer Overflow
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | vim-X11 | 2:8.0.1763-16.el8_5.13 | ALSA-2022:0366 |
| AlmaLinux:8 | vim-common | 2:8.0.1763-16.el8_5.13 | ALSA-2022:0366 |
| AlmaLinux:8 | vim-enhanced | 2:8.0.1763-16.el8_5.13 | ALSA-2022:0366 |
| AlmaLinux:8 | vim-filesystem | 2:8.0.1763-16.el8_5.13 | ALSA-2022:0366 |
| AlmaLinux:8 | vim-minimal | 2:8.0.1763-16.el8_5.13 | ALSA-2022:0366 |
| Debian:12 | vim | 2:8.2.3565-1 | DEBIAN-CVE-2021-3872 |
| Debian:13 | vim | 2:8.2.3565-1 | DEBIAN-CVE-2021-3872 |
| Debian:14 | vim | 2:8.2.3565-1 | DEBIAN-CVE-2021-3872 |
| Rocky Linux:8 | vim | 2:8.0.1763-16.el8_5.4 | RLSA-2022:0366 |
| Ubuntu:22.04:LTS | vim | 2:8.2.3565-1ubuntu2 | UBUNTU-CVE-2021-3872 |
Affected products (as reported)
Weakness: CWE-122 · Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://huntr.dev/bounties/c958013b-1c09-4939-92ca-92f50aa169e8 x_refsource_CONFIRM
- https://github.com/vim/vim/commit/826bfe4bbd7594188e3d74d2539d9707b1c6a14b x_refsource_MISC
- FEDORA-2021-84f4cf3244 vendor-advisory, x_refsource_FEDORA
- FEDORA-2021-6988830606 vendor-advisory, x_refsource_FEDORA
- [debian-lts-announce] 20220311 [SECURITY] [DLA 2947-1] vim security update mailing-list, x_refsource_MLIST
- GLSA-202208-32 vendor-advisory, x_refsource_GENTOO
- https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html