Heap-based Buffer Overflow in vim/vim
Priority HIGH 67CWE-122Published · Updated
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-122 and the CVSS impact.
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.
Why it matters now
Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.0046 40th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial vim/vim (vim): 9.0.0947Red Hat: 2 without a fix
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vim | vim/vim | before 9.0.0947 | 9.0.0947 | Patch available | CNA |
- vim/vim Vendorvim Affected before 9.0.0947 Fixed in 9.0.0947 Patch available CNA
CPE configurations NVD · 6
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
| cpe:2.3:a:neovim:neovim:*:*:*:*:*:*:*:* | 0.1.0 to before 0.10.0 | Vulnerable | Neovim |
| cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* | up to 9.0.0946 | Vulnerable | vim |
| cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* | 36 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
- cpe:2.3:a:neovim:neovim:*:*:*:*:*:*:*:* Versions 0.1.0 to before 0.10.0 Vulnerable ·Neovim
- cpe:2.3:a:vim:vim:*:*:*:*:*:*:*:* Versions up to 9.0.0946 Vulnerable ·vim
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA vim/vim (vim) Fixed in 9.0.0947
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | — |
Not affected: 3 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2022-4141
- 2026-10-03 Alias added: GHSA-w2q9-j8v8-2gf2
- 2026-11-06 Affected versions changed · Red Hat
References
More Vim vulnerabilities
- TI-2022-03248 Heap-based Buffer Overflow in vim/vim CVSS 3.1CRITICAL 9.8
- TI-2024-15103 Vim before 9.0.2142 has a stack-based buffer overflow because did_set_langmap in map.c… CVSS 3.1HIGH 7.8
- TI-2023-05093 Use After Free in vim/vim CVSS 3.1HIGH 7.8
- TI-2023-04407 Heap-based Buffer Overflow in vim/vim CVSS 3.1HIGH 7.8
- TI-2023-04379 Heap-based Buffer Overflow in vim/vim CVSS 3.1HIGH 7.8
- TI-2023-04378 Use After Free in vim/vim CVSS 3.1HIGH 7.8
Sources
- CVE-2022-4141 · CVE Program
- CVE-2022-4141 · NVD
- FIRST EPSS
- GHSA-w2q9-j8v8-2gf2 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-4141 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences