CVE-2021-4166 | Out-of-bounds Read in vim/vim

Exp

vim is vulnerable to Out-of-bounds Read

Published: 2021-12-25 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-4166 is rated High Exploit Risk (63.5/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.35%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-4166

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-4166

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-01-20 0.22% 0.35% +0.13%
2 2025-11-21 0.63% 0.22% -0.41%
3 2025-11-18 0.63%

Full EPSS history (15 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-4166

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.1 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.2 [email protected]
7.1 3.0 HIGH
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.2 [email protected]
5.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:N/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:N)
No integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 4.9 [email protected]

Weakness enumeration for CVE-2021-4166

OS Trackers for CVE-2021-4166

vendor priority summary link
alpine high CVE-2021-4166: 1 source package rows (vim); 54 state rows across 8 repos (3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 8, open 46. https://security.alpinelinux.org/vuln/CVE-2021-4166
debian unimportant CVE-2021-4166 unimportant priority: Debian including 1 source packages (vim), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 4, open 1. https://security-tracker.debian.org/tracker/CVE-2021-4166
gentoo low CVE-2021-4166: 1 GLSA(s) (202208-32), 3 atom(s) (app-editors/gvim, app-editors/vim, app-editors/vim-core); latest impact low. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-4166
redhat low https://access.redhat.com/security/cve/CVE-2021-4166
suse medium CVE-2021-4166 severity moderate: SUSE including 277 source package names (11.1-2.2.254:vim-8.2.5038-150000.5.21.1, 11.1-2.2.254:vim-data-common-8.2.5038-150000.5.21.1, …), 694 product×package rows across 195 product lines (Container ses/7.1/ceph/haproxy, Container suse/sle-micro-rancher/5.2, … (195 product lines)): Fixed 497, Known Affected 190, Known Not Affected 7. https://www.suse.com/security/cve/CVE-2021-4166/
ubuntu medium CVE-2021-4166 medium priority: Ubuntu including 1 source packages (vim), 9 status rows across 9 suites (bionic, focal, hirsute, impish, jammy, kinetic, trusty, upstream, xenial): ignored 5, not-affected 2, released 2. https://ubuntu.com/security/CVE-2021-4166

Affected software / configurations for CVE-2021-4166

Vendor Product Version Raw CPE
vim vim < 8.2.3884 cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
opensuse factory cpe:2.3:a:opensuse:factory:-:*:*:*:*:*:*:*
suse linux_enterprise 12.0 cpe:2.3:o:suse:linux_enterprise:12.0:*:*:*:*:*:*:*
suse linux_enterprise 15.0 cpe:2.3:o:suse:linux_enterprise:15.0:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:*:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2020-001:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-001:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-002:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-003:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-004:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-005:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-006:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-007:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2021-008:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2022-001:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2022-002:*:*:*:*:*:*
apple mac_os_x 10.15.7 cpe:2.3:o:apple:mac_os_x:10.15.7:security_update_2022-003:*:*:*:*:*:*
apple macos < 12.3 cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*
apple macos >= 11.0, < 11.6.6 cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*
apple macos 10.15.7 cpe:2.3:o:apple:macos:10.15.7:security_update_2022-004:*:*:*:*:*:*

References for CVE-2021-4166

URL Tags
http://seclists.org/fulldisclosure/2022/Jul/14 Mailing List Third Party Advisory
http://seclists.org/fulldisclosure/2022/Mar/29 Mailing List Third Party Advisory
http://seclists.org/fulldisclosure/2022/May/35 Mailing List Third Party Advisory
http://www.openwall.com/lists/oss-security/2022/01/15/1 Mailing List Third Party Advisory
https://github.com/vim/vim/commit/6f98371532fcff911b462d51bc64f2ce8a6ae682 Patch Third Party Advisory
https://huntr.dev/bounties/229df5dd-5507-44e9-832c-c70364bdf035 Exploit Issue Tracking Patch Third Party Advisory
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 Third Party Advisory
https://support.apple.com/kb/HT213183 Release Notes Third Party Advisory
https://support.apple.com/kb/HT213256 Third Party Advisory
https://support.apple.com/kb/HT213343 Third Party Advisory
cvelogic Threat Intelligence