---
id: CVE-2021-3974
title: vim is vulnerable to Use After Free
summary: vim is vulnerable to Use After Free
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-416
vendor: vim
product: vim
affected:
  - vim < 8.2.3612
  - fedora = 34
  - fedora = 35
  - debian_linux = 9.0
  - debian_linux = 10.0
patched:
  - vim 8.2.3612
published: '2021-11-19'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T21:17:41.590'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-3974'
references:
  - url: 'http://www.openwall.com/lists/oss-security/2022/01/15/1'
    label: security@huntr.dev
  - url: 'https://github.com/vim/vim/commit/64066b9acd9f8cffdf4840f797748f938a13f2d6'
    label: security@huntr.dev
  - url: 'https://huntr.dev/bounties/e402cb2c-8ec4-4828-a692-c95f8e0de6d4'
    label: security@huntr.dev
  - url: 'https://lists.debian.org/debian-lts-announce/2022/03/msg00018.html'
    label: security@huntr.dev
  - url: 'https://lists.debian.org/debian-lts-announce/2022/11/msg00009.html'
    label: security@huntr.dev
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FNXY7T5OORA7UJIMGSJBGHFMU6UZWS6P/
    label: security@huntr.dev
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IH2LS2DXBTYOCWGAKFMBF3HTWWXPBEFL/
    label: security@huntr.dev
  - url: 'https://security.gentoo.org/glsa/202208-32'
    label: security@huntr.dev
  - url: 'http://www.openwall.com/lists/oss-security/2022/01/15/1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/vim/vim/commit/64066b9acd9f8cffdf4840f797748f938a13f2d6'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://huntr.dev/bounties/e402cb2c-8ec4-4828-a692-c95f8e0de6d4'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2022/03/msg00018.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2022/11/msg00009.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FNXY7T5OORA7UJIMGSJBGHFMU6UZWS6P/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IH2LS2DXBTYOCWGAKFMBF3HTWWXPBEFL/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202208-32'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-3974.json
  - url: 'https://access.redhat.com/security/cve/CVE-2021-3974'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2025061'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2021-3974'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2021-3974'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
  - score-dispute
epss: 0.01363
epssPercentile: 0.70943
ingestedAt: '2026-10-08T22:11:53.743Z'
scores:
  nvd: 7.8
  vendor: 2.9
---

## Overview

vim is vulnerable to Use After Free

## Affected

- `vim < 8.2.3612`
- `fedora = 34`
- `fedora = 35`
- `debian_linux = 9.0`
- `debian_linux = 10.0`

## Remediation

Upgrade past the affected range:

- `vim 8.2.3612`

## Vendor advisories

- **Red Hat VEX** · Low · affected: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · no fix planned: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · updated 2026-10-08 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-3974.json)
