---
id: CVE-2023-48706
title: >-
  Vim is a UNIX editor that, prior to version 9.0.2121, has a
  heap-use-after-free vulnerability
summary: >-
  Vim is a UNIX editor that, prior to version 9.0.2121, has a
  heap-use-after-free vulnerability. When executing a `:s` command for the very
  first time and using a sub-replace-special atom inside the substitution part,
  it is possible that t…
severity: low
cvss: 3.6
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:L'
cwe:
  - CWE-416
vendor: neovim
product: neovim
affected:
  - fedora = 38
  - fedora = 39
  - hci_compute_node
  - neovim <= 0.9.5
  - vim < 9.0.2121
patched:
  - vim 9.0.2121
published: '2023-11-22'
updated: '2026-09-17'
sourceUpdated: '2026-09-17T17:59:18.660'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2023-48706'
references:
  - url: 'http://www.openwall.com/lists/oss-security/2023/11/22/3'
    label: security-advisories@github.com
  - url: 'https://github.com/gandalf4a/crash_report/blob/main/vim/vim_huaf'
    label: security-advisories@github.com
  - url: 'https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb'
    label: security-advisories@github.com
  - url: 'https://github.com/vim/vim/pull/13552'
    label: security-advisories@github.com
  - url: 'https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q'
    label: security-advisories@github.com
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/
    label: security-advisories@github.com
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/
    label: security-advisories@github.com
  - url: 'https://security.netapp.com/advisory/ntap-20240105-0001/'
    label: security-advisories@github.com
  - url: 'http://www.openwall.com/lists/oss-security/2023/11/22/3'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/gandalf4a/crash_report/blob/main/vim/vim_huaf'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/vim/vim/pull/13552'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20240105-0001/'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00544
epssPercentile: 0.43258
ingestedAt: '2026-06-29T13:24:33.942Z'
---

## Overview

Vim is a UNIX editor that, prior to version 9.0.2121, has a heap-use-after-free vulnerability. When executing a `:s` command for the very first time and using a sub-replace-special atom inside the substitution part, it is possible that the recursive `:s` call causes free-ing of memory which may later then be accessed by the initial `:s` command. The user must intentionally execute the payload and the whole process is a bit tricky to do since it seems to work only reliably for the very first :s command. It may also cause a crash of Vim. Version 9.0.2121 contains a fix for this issue.

## Affected

- `fedora = 38`
- `fedora = 39`
- `hci_compute_node`
- `neovim <= 0.9.5`
- `vim < 9.0.2121`

## Remediation

Upgrade past the affected range:

- `vim 9.0.2121`
