Vulnerability · Published Nov 25, 2022 · Assigned by @huntrdev
CVE-2022-4141Heap-based Buffer Overflow in vim/vim
High 7.3
In plain English
A high-severity heap buffer overflow in vim/vim from vim. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 40% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.0)7.3High
Exploit odds (30 days)0.5%top 60.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known
Official description
Heap 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | vim | 9.0.0999-r0 | ALPINE-CVE-2022-4141 |
| Alpine:v3.21 | vim | 9.0.0999-r0 | ALPINE-CVE-2022-4141 |
| Alpine:v3.22 | vim | 9.0.0999-r0 | ALPINE-CVE-2022-4141 |
| Alpine:v3.23 | vim | 9.0.0999-r0 | ALPINE-CVE-2022-4141 |
| Alpine:v3.24 | vim | 9.0.0999-r0 | ALPINE-CVE-2022-4141 |
| Debian:12 | vim | 2:9.0.1000-1 | DEBIAN-CVE-2022-4141 |
| Debian:13 | vim | 2:9.0.1000-1 | DEBIAN-CVE-2022-4141 |
| Debian:14 | vim | 2:9.0.1000-1 | DEBIAN-CVE-2022-4141 |
| Ubuntu:22.04:LTS | vim | no fix listed | UBUNTU-CVE-2022-4141 |
Affected products (as reported)
Weakness: CWE-122 · Vector: CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
References
- https://huntr.dev/bounties/20ece512-c600-45ac-8a84-d0931e05541f
- https://github.com/vim/vim/commit/cc762a48d42b579fb7bdec2c614636b830342dd5
- FEDORA-2022-1e14f3ae45 vendor-advisory
- FEDORA-2022-fc4c513d06 vendor-advisory
- GLSA-202305-16 vendor-advisory
- [debian-lts-announce] 20230612 [SECURITY] [DLA 3453-1] vim security update mailing-list
- https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html