Use After Free in vim/vim
Use After Free in GitHub repository vim/vim prior to 8.2.
- Published
- Jan 30, 2022
- Updated
- Jun 17, 2026
- EPSS
- 1.4% · 71th percentile
- CWE
- CWE-416
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
31
Monitor
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.4%
CNA vs NVD score
- NVD
- 7.8
- CNA · @huntrdev
- 8.4
- 0.6 point gap
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| vim | vim | cpe:2.3:a:vim:vim |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- debian debian linux9.0
- fedoraproject fedora34
- fedoraproject fedora35
- vim vimbefore 8.2.4253
Versions reported by the vendor
Affected version ranges reported by the assigning authority (@huntrdev). Independent of NVD's CPE analysis and usually ahead of it.
vim vim/vim
- unspecified and later · before 8.2affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | vim-common | before 2:8.0.1763-16.el8_5.13 | 2:8.0.1763-16.el8_5.13 |
| AlmaLinux:8 | vim-common | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| AlmaLinux:8 | vim-enhanced | before 2:8.0.1763-16.el8_5.13 | 2:8.0.1763-16.el8_5.13 |
| AlmaLinux:8 | vim-enhanced | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| AlmaLinux:8 | vim-filesystem | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| AlmaLinux:8 | vim-filesystem | before 2:8.0.1763-16.el8_5.13 | 2:8.0.1763-16.el8_5.13 |
| AlmaLinux:8 | vim-minimal | before 2:8.0.1763-16.el8_5.13 | 2:8.0.1763-16.el8_5.13 |
| AlmaLinux:8 | vim-X11 | before 2:8.0.1763-16.el8_5.13 | 2:8.0.1763-16.el8_5.13 |
| AlmaLinux:8 | vim-X11 | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Alpine:v3.12 | vim | before 8.2.4619-r0 | 8.2.4619-r0 |
| Alpine:v3.16 | vim | before 8.2.4350-r0 | 8.2.4350-r0 |
| Debian:10 | vim | before 2:8.1.0875-5+deb10u3 | 2:8.1.0875-5+deb10u3 |
| Debian:12 | vim | before 2:8.2.4659-1 | 2:8.2.4659-1 |
| Debian:9 | vim | before 2:8.0.0197-4+deb9u6 | 2:8.0.0197-4+deb9u6 |
| openSUSE:Leap 15.3 | vim | before 8.0.1568-5.17.1 | 8.0.1568-5.17.1 |
| openSUSE:Tumbleweed | vim | before 9.0.0453-2.1 | 9.0.0453-2.1 |
| Red Hat:enterprise_linux:8::appstream | vim-common | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-common-debuginfo | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-debuginfo | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-debugsource | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-enhanced | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-enhanced-debuginfo | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-filesystem | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
| Red Hat:enterprise_linux:8::appstream | vim-minimal-debuginfo | before 2:8.0.1763-16.el8_5.12 | 2:8.0.1763-16.el8_5.12 |
+18
Same product
vim: all recordsOther highest-scoring records for the same primary product.
- CVE-2008-2712Vim 7.1.314, 6.4, and other versions allows user-assisted remote attackers to execute arbitrary commands via Vim scripts that do not properl42Plan
- CVE-2022-0318Heap-based Buffer Overflow in vim/vim40Plan
- CVE-2019-12735getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command i40Plan
- CVE-2017-6350An integer overflow at an unserialize_uep memory allocation site would occur for vim before patch 8.0.0378, if it does not properly validate40Plan
- CVE-2017-6349An integer overflow at a u_read_undo memory allocation site would occur for vim before patch 8.0.0377, if it does not properly validate valu40Plan
- CVE-2017-5953vim before patch 8.0.0322 does not properly validate values for tree length when handling a spell file, which may result in an integer overf40Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:vim-common | 2:8.0.1763-16.el8_5.12 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:vim-enhanced | 2:8.0.1763-16.el8_5.13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:vim-filesystem | 2:8.0.1763-16.el8_5.13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:vim-minimal | 2:8.0.1763-16.el8_5.13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:vim-X11 | 2:8.0.1763-16.el8_5.13 · AlmaLinux:8 | Package registry (OSV) |
| alpine:vim | 8.2.4619-r0 · Alpine:v3.12 | Package registry (OSV) |
| debian:vim | 2:8.2.4659-1 · Debian:12 | Package registry (OSV) |
| opensuse:vim | 8.0.1568-5.17.1 · openSUSE:Leap 15.3 | Package registry (OSV) |
| red hat:vim | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::baseos | Package registry (OSV) |
| red hat:vim-common | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-common-debuginfo | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-debuginfo | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-debugsource | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-enhanced | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-enhanced-debuginfo | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-filesystem | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::baseos | Package registry (OSV) |
| red hat:vim-minimal | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::baseos | Package registry (OSV) |
| red hat:vim-minimal-debuginfo | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-X11 | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:vim-X11-debuginfo | 2:8.2.2637-15.el9 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| rocky linux:vim | 2:8.0.1763-16.el8_5.12 · Rocky Linux:8 | Package registry (OSV) |
| suse:vim | 8.0.1568-5.17.1 · SUSE:Linux Enterprise Module for Basesystem 15 SP3 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvd-primary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);/* ... another thread is still running ... */process(dev->buf);Fixed
lock(&dev->lock);free(dev->buf);dev->buf = NULL;unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/vim/vim/commit/37f47958b8a2a44abc60614271d9537e7f14e51a
- lists.debian.org/debian-lts-announce/2022/05/msg00022.html
- lists.debian.org/debian-lts-announce/2022/11/msg00009.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7ZLEHVP4LNAGER4ZDGUDS5V5YVQD6INF/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UFXFAILMLUIK4MBUEZO4HNBNKYZRJ5AP/
- security.gentoo.org/glsa/202208-32
Vendor advisories and official records. Exploit/PoC links are deliberately left out.