---
id: CVE-2022-2125
title: Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.
summary: Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.
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-122
  - CWE-787
vendor: vim
product: vim
affected:
  - vim < 8.2.5122
  - fedora = 35
  - fedora = 36
  - macos < 11.7
  - 'macos >= 12.0, < 12.6'
patched:
  - vim 8.2.5122
  - macos 12.6
published: '2022-06-19'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T21:17:45.557'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2022-2125'
references:
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/28'
    label: security@huntr.dev
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/41'
    label: security@huntr.dev
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/43'
    label: security@huntr.dev
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/45'
    label: security@huntr.dev
  - url: 'https://github.com/vim/vim/commit/0e8e938d497260dd57be67b4966cb27a5f72376f'
    label: security@huntr.dev
  - url: 'https://huntr.dev/bounties/17dab24d-beec-464d-9a72-5b6b11283705'
    label: security@huntr.dev
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GFD2A4YLBR7OIRHTL7CK6YNMEIQ264CN/
    label: security@huntr.dev
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U743FMJGFQ35GBPCQ6OWMVZEJPDFVEWM/
    label: security@huntr.dev
  - url: 'https://security.gentoo.org/glsa/202208-32'
    label: security@huntr.dev
  - url: 'https://security.gentoo.org/glsa/202305-16'
    label: security@huntr.dev
  - url: 'https://support.apple.com/kb/HT213443'
    label: security@huntr.dev
  - url: 'https://support.apple.com/kb/HT213444'
    label: security@huntr.dev
  - url: 'https://support.apple.com/kb/HT213488'
    label: security@huntr.dev
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/28'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/41'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/43'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2022/Oct/45'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/vim/vim/commit/0e8e938d497260dd57be67b4966cb27a5f72376f'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://huntr.dev/bounties/17dab24d-beec-464d-9a72-5b6b11283705'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GFD2A4YLBR7OIRHTL7CK6YNMEIQ264CN/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U743FMJGFQ35GBPCQ6OWMVZEJPDFVEWM/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202208-32'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202305-16'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT213443'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT213444'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT213488'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.01643
epssPercentile: 0.75684
ingestedAt: '2026-10-08T22:11:53.751Z'
---

## Overview

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2.

## Affected

- `vim < 8.2.5122`
- `fedora = 35`
- `fedora = 36`
- `macos < 11.7`
- `macos >= 12.0, < 12.6`

## Remediation

Upgrade past the affected range:

- `vim 8.2.5122`
- `macos 12.6`
