Heap-based Buffer Overflow in vim/vim
Summary
| CVE | CVE-2022-4141 |
|---|---|
| State | PUBLISHED |
| Assigner | @huntrdev |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-11-25 14:15:10 UTC |
| Updated | 2026-09-24 15:38:26 UTC |
| Description | Heap based buffer overflow in vim/vim 9.0.0946 and below by allowing an attacker to CTRL-W gf in the expression used in the RHS of the substitute command. |
Risk And Classification
Primary CVSS: v3.1 7.8 HIGH from [email protected]
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS: 0.004350000 probability, percentile 0.351250000 (date 2026-09-24)
Problem Types: CWE-122 | CWE-787 | CWE-122 CWE-122 Heap-based Buffer Overflow
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 3.0 | [email protected] | Secondary | 7.3 | HIGH | CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
| 3.0 | CNA | DECLARED | 7.3 | HIGH | CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS v3.0 Breakdown
Attack Vector
LocalAttack Complexity
LowPrivileges Required
LowUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Debian | Debian Linux | 10.0 | All | All | All |
| Operating System | Debian | Debian Linux | 11.0 | All | All | All |
| Operating System | Fedoraproject | Fedora | 36 | All | All | All |
| Operating System | Fedoraproject | Fedora | 37 | All | All | All |
| Application | Neovim | Neovim | All | All | All | All |
| Application | Vim | Vim | All | All | All | All |
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| huntr – Security Bounties for any GitHub repository | af854a3a-2127-422b-91ae-364da2661108 | huntr.dev | Exploit, Issue Tracking, Patch, Third Party Advisory |
| [SECURITY] Fedora 36 Update: vim-9.0.1006-1.fc36 - package-announce - Fedora Mailing-Lists | af854a3a-2127-422b-91ae-364da2661108 | lists.fedoraproject.org | Mailing List, Third Party Advisory |
| lists.debian.org/debian-lts-announce/2025/03/msg00023.html | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | Mailing List, Third Party Advisory |
| [SECURITY] [DLA 3453-1] vim security update | af854a3a-2127-422b-91ae-364da2661108 | lists.debian.org | Mailing List, Third Party Advisory |
| [SECURITY] Fedora 37 Update: vim-9.0.1006-1.fc37 - package-announce - Fedora Mailing-Lists | af854a3a-2127-422b-91ae-364da2661108 | lists.fedoraproject.org | Mailing List, Third Party Advisory |
| Vim, gVim: Multiple Vulnerabilities (GLSA 202305-16) — Gentoo security | af854a3a-2127-422b-91ae-364da2661108 | security.gentoo.org | Third Party Advisory |
| patch 9.0.0947: invalid memory access in substitute with function · vim/vim@cc762a4 · GitHub | af854a3a-2127-422b-91ae-364da2661108 | github.com | Patch, Third Party Advisory |
| [SECURITY] Fedora 37 Update: vim-9.0.1006-1.fc37 - package-announce - Fedora Mailing-Lists | MITRE | lists.fedoraproject.org | |
| [SECURITY] Fedora 36 Update: vim-9.0.1006-1.fc36 - package-announce - Fedora Mailing-Lists | MITRE | lists.fedoraproject.org | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 181841 Debian Security Update for vim (DLA 3453-1)
- 183551 Debian Security Update for vim (CVE-2022-4141)
- 283388 Fedora Security Update for vim (FEDORA-2022-fc4c513d06)
- 283389 Fedora Security Update for vim (FEDORA-2022-1e14f3ae45)
- 354650 Amazon Linux Security Advisory for vim : ALAS2-2023-1912
- 354686 Amazon Linux Security Advisory for vim : ALAS-2023-1664
- 354693 Amazon Linux Security Advisory for vim : ALAS2022-2023-269
- 355135 Amazon Linux Security Advisory for vim : ALAS2023-2023-098
- 502811 Alpine Linux Security Update for vim
- 503137 Alpine Linux Security Update for vim
- 505952 Alpine Linux Security Update for vim
- 672583 EulerOS Security Update for vim (EulerOS-SA-2023-1342)
- 672642 EulerOS Security Update for vim (EulerOS-SA-2023-1403)
- 672655 EulerOS Security Update for vim (EulerOS-SA-2023-1375)
- 672740 EulerOS Security Update for vim (EulerOS-SA-2023-1460)
- 672753 EulerOS Security Update for vim (EulerOS-SA-2023-1485)
- 672788 EulerOS Security Update for vim (EulerOS-SA-2023-1543)
- 672823 EulerOS Security Update for vim (EulerOS-SA-2023-1568)
- 672837 EulerOS Security Update for vim (EulerOS-SA-2023-1579)
- 672847 EulerOS Security Update for vim (EulerOS-SA-2023-1589)
- 673090 EulerOS Security Update for vim (EulerOS-SA-2023-2179)
- 710718 Gentoo Linux Vim, gVim Multiple Vulnerabilities (GLSA 202305-16)
- 753073 SUSE Enterprise Linux Security Update for vim (SUSE-SU-2022:4631-1)
- 753603 SUSE Enterprise Linux Security Update for vim (SUSE-SU-2023:0209-1)
- 904573 Common Base Linux Mariner (CBL-Mariner) Security Update for vim (11510)
- 904581 Common Base Linux Mariner (CBL-Mariner) Security Update for vim (11504)
- 904625 Common Base Linux Mariner (CBL-Mariner) Security Update for vim (11510-1)
- 904648 Common Base Linux Mariner (CBL-Mariner) Security Update for vim (11504-1)