# CVE-2022-4141: Heap-based Buffer Overflow in vim/vim

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-11-25 · Modified: 2025-11-03
- Aliases: ALPINE-CVE-2022-4141, MGASA-2022-0464, UBUNTU-CVE-2022-4141, DEBIAN-CVE-2022-4141
- Record: https://cvemate.com/vulnerability/CVE-2022-4141 · JSON: https://cvemate.com/vulnerability/CVE-2022-4141/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.474%, percentile 42.627%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- alpine vim (Alpine Linux): \< 9.0.0999-r0
- debian vim (Debian): \< 2:9.0.1000-1
- ubuntu vim (Ubuntu): All versions (No fix recorded)
- debian debian\_linux: 10.0 \| 11.0
- fedoraproject fedora: 36 \| 37
- mageia vim (Mageia): \< 9.0.963-1.mga8
- neovim neovim: ≥ 0.1.0, \< 0.10.0
- vim vim: ≤ 9.0.0946
- vim vim/vim: ≥ unspecified, \< 9.0.0947

## References

- <https://huntr.dev/bounties/20ece512-c600-45ac-8a84-d0931e05541f>
- <https://github.com/vim/vim/commit/cc762a48d42b579fb7bdec2c614636b830342dd5>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AZ3JMSUCR6Y7626RDWQ2HNSUFIQOJ33G/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6ZNKVN4GICORTVFKVCM4MSOXCYWNHUC/>
- <https://security.gentoo.org/glsa/202305-16>
- <https://lists.debian.org/debian-lts-announce/2023/06/msg00015.html>
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html>
- <https://security.alpinelinux.org/vuln/CVE-2022-4141>
- <https://advisories.mageia.org/MGASA-2022-0464.html>
- <https://bugs.mageia.org/show_bug.cgi?id=31239>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/AZ3JMSUCR6Y7626RDWQ2HNSUFIQOJ33G/>
- <https://ubuntu.com/security/CVE-2022-4141>
- <https://www.cve.org/CVERecord?id=CVE-2022-4141>
- <https://security-tracker.debian.org/tracker/CVE-2022-4141>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-4141>

---

Data as of 2026-12-05T03:31:59.982Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
