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

- Severity: High 7.3 (CVSS:3.0, scored by @huntrdev) `CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.47%, higher than 42% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-11-25T00:00:00.000Z
- Modified: 2026-09-24T15:38:26.440Z
- Weaknesses: CWE-122, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntrdev

## 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.

(As written by CVE List.)

## Affected

- vim vim/vim: from unspecified before 9.0.0947
- debian debian_linux: 10.0; 11.0
- neovim neovim: from 0.1.0 before 0.10.0
- vim vim: up to 9.0.0946
- fedoraproject fedora: 36; 37

## Every score

- @huntrdev: CVSS:3.0 7.3 High `CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://huntr.dev/bounties/20ece512-c600-45ac-8a84-d0931e05541f> (exploit, issue-tracking, patch, third-party-advisory)
- <https://github.com/vim/vim/commit/cc762a48d42b579fb7bdec2c614636b830342dd5> (patch, third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AZ3JMSUCR6Y7626RDWQ2HNSUFIQOJ33G/> (mailing-list, third-party-advisory, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6ZNKVN4GICORTVFKVCM4MSOXCYWNHUC/> (mailing-list, third-party-advisory, vendor-advisory)
- <https://security.gentoo.org/glsa/202305-16> (third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/06/msg00015.html> (mailing-list, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2022-4141](https://www.cve.org/CVERecord?id=CVE-2022-4141), CVE Terms of Use, modified 2025-11-03
- NVD: [CVE-2022-4141](https://nvd.nist.gov/vuln/detail/CVE-2022-4141), Public domain, modified 2026-09-24

---

Page: https://cve.day/CVE-2022-4141 · Whole record: https://cve.day/CVE-2022-4141.json · Rebuilt by cve.day 2026-11-25T22:58:16.936Z
