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

Published Oct 19, 2021
·
Updated

Last updated 24 July 2024

Other sources

vim is vulnerable to Heap-based Buffer Overflow

— Launchpad

Affected Software

6 affected componentsFixes available
debian/vim<=2:8.2.2434-3+deb11u1
2:9.0.1378-22:9.1.0709-2
vim Vim<8.2.3487
Fedoraproject Fedora=33
Fedoraproject Fedora=35
Debian Debian Linux=9.0
redhat/vim<8.2.3487
8.2.3487

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/vim to a version that resolves this vulnerability.

    Fixed in 2:9.0.1378-2Fixed in 2:9.1.0709-2
  2. Upgrade

    Upgrade redhat/vim to a version that resolves this vulnerability.

    Fixed in 8.2.3487
  3. Upgrade

    Upgrade vim/vim to a version that resolves this vulnerability.

    Patch 826bfe4bbd7594188e3d74d2539d9707b1c6a14b

Event History

Oct 19, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
CVE Published
via MITRE·12:30 PM
Data Sourced
via MITRE·12:30 PM
DescriptionSeverityWeakness
Oct 20, 2021
Data Sourced
via Red Hat·05:41 PM
DescriptionSeverityAffected Software
Sep 1, 2022
Data Sourced
01:57 PM
Weakness
Nov 7, 2023
Data Sourced
via NVD·03:38 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
03:38 AM
Affected Software
Jun 17, 2026
Updated
via NVD·04:05 AM
RemedyAffected Software

Frequently Asked Questions

1

What is CVE-2021-3872?

CVE-2021-3872 is a vulnerability in vim that allows for a heap-based buffer overflow.

2

How severe is CVE-2021-3872?

CVE-2021-3872 has a severity rating of 7.8, which is considered high.

3

What software is affected by CVE-2021-3872?

Vim versions 8.2.2434-3ubuntu3.1, 8.1.2269-1ubuntu5.4, 8.2.2434-1ubuntu1.2, 8.2.3487, 8.2.3565-1ubuntu2, 8.1.0875-5+deb10u6, 8.2.3565-1ubuntu2, 9.0.1378-2, 9.0.1894-1, and 9.0.2018-1 are affected.

4

How can I fix CVE-2021-3872?

To fix CVE-2021-3872, you should update your vim package to version 8.2.3487 or later.

5

Where can I find more information about CVE-2021-3872?

You can find more information about CVE-2021-3872 at the following links: [Mitre](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3872), [Github](https://github.com/vim/vim/commit/826bfe4bbd7594188e3d74d2539d9707b1c6a14b), [Huntr](https://huntr.dev/bounties/c958013b-1c09-4939-92ca-92f50aa169e8).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203