# CVE-2023-48706: vim: Vim is a UNIX editor that, prior to version 9.0.2121, has a heap-use-after-free vulnerability

CVE-2023-48706 is fixed in 21 products on 1 platform, first by vim 2:8.2.3995-1ubuntu2.15, released November 22, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2023-48706
- Priority: Routine
- CVSS: 4.7 (medium)
- EPSS: 0.0054
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Nov 22, 2023

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | vim Debian 13.5 (trixie) | 2:9.0.2189-1 | [DEBIAN-CVE-2023-48706](https://patchblox.com/security/data/fix/linux/debian-cve-2023-48706.md) | Nov 22, 2023 |
| Linux | vim Debian 14 | 2:9.0.2189-1 | [DEBIAN-CVE-2023-48706](https://patchblox.com/security/data/fix/linux/debian-cve-2023-48706.md) | Nov 22, 2023 |
| Linux | vim Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-athena Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-athena 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-athena-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-athena Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-athena 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-athena-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-common Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-common 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-common-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-common Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-common 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-common-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-common amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-data amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-debuginfo amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-debugsource amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-default-editor amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-enhanced amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-enhanced-debuginfo amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-filesystem amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-gtk Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-gtk 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-gtk-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-gtk3 Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-gtk3 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-gtk3-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-gtk3 Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-gtk3 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-gtk3-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-gui-common Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-gui-common 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-gui-common-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-gui-common Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-gui-common 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-gui-common-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-minimal amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-minimal-debuginfo amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | vim-motif Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-motif 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-motif-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-nox Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-nox 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-nox-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-nox Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-nox 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-nox-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-runtime Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-runtime 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-runtime-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-runtime Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-runtime 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-runtime-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | vim-tiny Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [vim-tiny 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-vim-tiny-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | vim-tiny Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [vim-tiny 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-vim-tiny-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | xxd Ubuntu 22.04.1 LTS (jammy) | 2:8.2.3995-1ubuntu2.15 | [xxd 2:8.2.3995-1ubuntu2.15](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-xxd-2-8.2.3995-1ubuntu2.15.md) | Nov 22, 2023 |
| Linux | xxd Ubuntu 24.04.5 LTS (noble) | 2:9.0.2116-1ubuntu2 | [xxd 2:9.0.2116-1ubuntu2](https://patchblox.com/security/data/fix/linux/ubuntu-noble-xxd-2-9.0.2116-1ubuntu2.md) | Nov 22, 2023 |
| Linux | xxd amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |
| Linux | xxd-debuginfo amzn 2023 | 2:9.0.2153-1.amzn2023 | [ALAS2023-2024-518](https://patchblox.com/security/data/fix/linux/alas2023-2024-518.md) | Feb 15, 2024 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
