Heap-based Buffer Overflow in vim/vim

Summary

CVECVE-2022-4141
StatePUBLISHED
Assigner@huntrdev
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-11-25 14:15:10 UTC
Updated2026-09-24 15:38:26 UTC
DescriptionHeap 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


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary7.8HIGHCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3.0[email protected]Secondary7.3HIGHCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
3.0CNADECLARED7.3HIGHCVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVSS v3.0 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS: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)

TypeVendorProductVersionUpdateEditionLanguage
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

SourceVendorProductVersionPlatforms
CNA Vim Vim/vim affected unspecified 9.0.0947 custom Not specified

References

ReferenceSourceLinkTags
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

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)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report