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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| vim | vim | < 9.0.2121 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | vim | 2:9.0.2189-1 | — |
| Debian 13 | vim | 2:9.0.2189-1 | — |
| Debian 12 | vim | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | vim | 2:9.0.2116-1ubuntu2 | — |
| Ubuntu 22.04 LTS | vim | 2:8.2.3995-1ubuntu2.15 | USN-6557-1 |
| Ubuntu 20.04 LTS | vim | 2:8.1.2269-1ubuntu5.21 | USN-6557-1 |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | vim | 2:8.0.1453-1ubuntu1.13+esm7 | USN-6557-1 |
| Ubuntu Pro 16.04 LTS | vim | 2:7.4.1689-3ubuntu1.5+esm22 | USN-6557-1 |
| Ubuntu Pro 14.04 LTS | vim | 2:7.4.052-1ubuntu3.1+esm15 | USN-6557-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | vim | 9.1.0111-150500.20.9.1 | SUSE-SU-2024:1287-1 |
| SLES 15 SP4 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES 15 SP3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES 15 SP2 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES 12 SP5 | vim | 9.1.0111-17.29.1 | SUSE-SU-2024:0783-1 |
Show 15 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP4 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES for SAP 15 SP3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES for SAP 15 SP2 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLES for SAP 12 SP5 | vim | 9.1.0111-17.29.1 | SUSE-SU-2024:0783-1 |
| SLE Micro 5.5 | vim | 9.1.0111-150500.20.9.1 | SUSE-SU-2024:1287-1 |
| SLE Micro 5.4 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE Micro 5.3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE Micro 5.2 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE Micro 5.1 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE HPC 15 SP4 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE HPC 15 SP3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SLE HPC 15 SP2 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SUSE Manager Server 4.3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SUSE Manager Proxy 4.3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| SUSE Enterprise Storage 7.1 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | vim | 9.1.0111-150500.20.9.1 | SUSE-SU-2024:1287-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.4 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
| openSUSE Leap Micro 5.3 | vim | 9.1.0111-150000.5.60.1 | SUSE-SU-2024:0871-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | vim | 9.0.2127-r0 | — |
| Alpine v3.23 | vim | 9.0.2127-r0 | — |
| Alpine v3.22 | vim | 9.0.2127-r0 | — |
| Alpine v3.21 | vim | 9.0.2127-r0 | — |
| Alpine v3.20 | vim | 9.0.2127-r0 | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | vim | 9.0.2127-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | xxd +6 | 2:9.0.2153-1.amzn2023 | ALAS2023-2024-518, ALAS2023-2024-469 |
| Amazon Linux 2 | xxd +6 | 2:9.0.2153-1.amzn2.0.1 | ALAS2-2024-2452, ALAS2-2024-2384 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 2 (CBL-Mariner) | vim | 9.0.2121-1 | — |
Advisories 10
- USN-6557-1 vim vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- SUSE-SU-2024:0783-1 Security update for vim SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1287-1 Security update for vim SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:0871-1 Security update for vim SUSE / openSUSE Security Updates · Feb 4, 2026
- VDE-2024-073 Phoenix Contact: Multiple Vulnerabilities in PLCnext Firmware CERT@VDE · May 22, 2025
- WID-SEC-2023-2997 vim: Schwachstelle ermöglicht Denial of Service BSI CERT-Bund (WID) · Oct 9, 2024
- ALAS2023-2024-518 Moderate: vim security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Feb 29, 2024
- ALAS2-2024-2452 Moderate: vim security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Feb 29, 2024
- ALAS2-2024-2384 Low: vim security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Jan 9, 2024
- ALAS2023-2024-469 Low: vim security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jan 8, 2024
References
- https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q
- https://github.com/vim/vim/pull/13552
- https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb
- https://github.com/gandalf4a/crash_report/blob/main/vim/vim_huaf
- http://www.openwall.com/lists/oss-security/2023/11/22/3
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DNMFS3IH74KEMMESOA3EOB6MZ56TWGFF/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IVA7K73WHQH4KVFDJQ7ELIUD2WK5ZT5E/
- https://security.netapp.com/advisory/ntap-20240105-0001/