# CVE-2021-3872: Heap-based Buffer Overflow in vim/vim

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2021-10-19 · Modified: 2025-11-03
- Aliases: UBUNTU-CVE-2021-3872, DEBIAN-CVE-2021-3872
- Record: https://cvemate.com/vulnerability/CVE-2021-3872 · JSON: https://cvemate.com/vulnerability/CVE-2021-3872/json

## Description

```text
vim is vulnerable to Heap-based Buffer Overflow
```

## Signals

- CVSS: 7.8 high (v3.0, CVE.org) CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 1.494%, percentile 75.039%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- debian vim (Debian): \< 2:8.2.3565-1
- ubuntu vim (Ubuntu): \< 2:8.1.2269-1ubuntu5.4 \| \< 2:8.2.3565-1ubuntu2
- debian debian\_linux: 9.0
- fedoraproject fedora: 33 \| 35
- vim vim: \< 8.2.3487
- vim vim/vim: ≥ unspecified, \< 8.2.3487

## References

- <https://huntr.dev/bounties/c958013b-1c09-4939-92ca-92f50aa169e8>
- <https://github.com/vim/vim/commit/826bfe4bbd7594188e3d74d2539d9707b1c6a14b>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S42L4Z4DTW4LHLQ4FJ33VEOXRCBE7WN4/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7K4JJBIH3OQSZRVTWKCJCDLGMFGQ5DOH/>
- <https://lists.debian.org/debian-lts-announce/2022/03/msg00018.html>
- <https://security.gentoo.org/glsa/202208-32>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html>
- <https://ubuntu.com/security/CVE-2021-3872>
- <https://ubuntu.com/security/notices/USN-5147-1>
- <https://www.cve.org/CVERecord?id=CVE-2021-3872>
- <https://security-tracker.debian.org/tracker/CVE-2021-3872>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3872>

---

Data as of 2026-12-05T03:51:50.955Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
