{"id":"CVE-2022-4141","title":"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.","summary":"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.","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-122","CWE-787"],"vendor":"neovim","product":"neovim","affected":["debian_linux = 10.0","debian_linux = 11.0","neovim >= 0.1.0, < 0.10.0","vim <= 9.0.0946","fedora = 36","fedora = 37"],"patched":["neovim 0.10.0"],"published":"2022-11-25","updated":"2026-09-24","sourceUpdated":"2026-09-24T15:38:26.440","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2022-4141","references":[{"url":"https://github.com/vim/vim/commit/cc762a48d42b579fb7bdec2c614636b830342dd5","label":"security@huntr.dev"},{"url":"https://huntr.dev/bounties/20ece512-c600-45ac-8a84-d0931e05541f","label":"security@huntr.dev"},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00015.html","label":"security@huntr.dev"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AZ3JMSUCR6Y7626RDWQ2HNSUFIQOJ33G/","label":"security@huntr.dev"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6ZNKVN4GICORTVFKVCM4MSOXCYWNHUC/","label":"security@huntr.dev"},{"url":"https://security.gentoo.org/glsa/202305-16","label":"security@huntr.dev"},{"url":"https://github.com/vim/vim/commit/cc762a48d42b579fb7bdec2c614636b830342dd5","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://huntr.dev/bounties/20ece512-c600-45ac-8a84-d0931e05541f","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00015.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2025/03/msg00023.html","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AZ3JMSUCR6Y7626RDWQ2HNSUFIQOJ33G/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/V6ZNKVN4GICORTVFKVCM4MSOXCYWNHUC/","label":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.gentoo.org/glsa/202305-16","label":"af854a3a-2127-422b-91ae-364da2661108"}],"tags":["nvd"],"epss":0.00435,"epssPercentile":0.35125,"ingestedAt":"2026-09-24T15:45:56.610Z","slug":"CVE-2022-4141","body":"## Overview\n\nHeap 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.\n\n## Affected\n\n- `debian_linux = 10.0`\n- `debian_linux = 11.0`\n- `neovim >= 0.1.0, < 0.10.0`\n- `vim <= 9.0.0946`\n- `fedora = 36`\n- `fedora = 37`\n\n## Remediation\n\nUpgrade past the affected range:\n\n- `neovim 0.10.0`","depth":"twilight","depthScore":43,"depthScoreParts":{"impact":42.9,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}