What’s Vulnerable › Vulnerabilities
CVE-2021-4187: Use After Free in vim/vim
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-12-29 · updated 2026-06-17
- Weakness: CWE-416
Description
vim is vulnerable to Use After Free
Affected products
- macOS: 10.15.7, 10.15.7-security_update_2020-001, 10.15.7-security_update_2021-001, 10.15.7-security_update_2021-002, 10.15.7-security_update_2021-003, 10.15.7-security_update_2021-004 (+7)
- Apple macOS: before 12.3; from 11.0 before 11.6.6; 10.15.7-security_update_2022-004 — fixed in 11.6.6, 12.3
- Fedoraproject Fedora: 34, 35
- vim/vim: through 8.2.3912
How to fix
Upgrade to a fixed version: Apple macOS 11.6.6, 12.3. Check the vendor advisory for mitigations.
References
- http://seclists.org/fulldisclosure/2022/Jul/14
- http://seclists.org/fulldisclosure/2022/Mar/29
- http://seclists.org/fulldisclosure/2022/May/35
- http://www.openwall.com/lists/oss-security/2022/01/15/1
- https://github.com/vim/vim/commit/4bf1006cae7e87259ccd5219128c3dba75774441
- https://huntr.dev/bounties/a8bee03a-6e2e-43bf-bee3-4968c5386a2e
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2EY2VFBU3YGGWI5BW4XKT3F37MYGEQUD/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3FH2J57GDA2WMBS6J56F6QQRA6BXQQFZ/
- https://security.gentoo.org/glsa/202208-32
- https://support.apple.com/kb/HT213183
- https://support.apple.com/kb/HT213256
- https://support.apple.com/kb/HT213343
Get alerted when CVE-2021-4187 or the next vulnerability affects your stack