Heap-based buffer overflow in Vim - CVE-2022-0572

 

Heap-based buffer overflow in Vim - CVE-2022-0572

Published: February 22, 2022


Vulnerability identifier: #VU60776
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-0572
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error when repeatedly using :retab. A remote attacker can trick the victim to open a specially crafted file, trigger heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

Vim
Amazon Linux AMI
Ubuntu
openEuler
Fedora
macOS
VMware Tanzu Application Service for VMs
Isolation Segment
vim (Ubuntu package)
vim-X11
vim-filesystem
vim-common
vim-minimal
vim-debugsource
vim-enhanced
vim-debuginfo
vim
VMware Tanzu Operations Manager

How to mitigate CVE-2022-0572

Install updates from vendor's website.

Vim - update to 8.2.4359
vim (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:7.4.16893ubuntu1.5+esm6, 2:8.0.1453-1ubuntu1.13, 2:8.1.2269-1ubuntu5.14, 2:8.2.3995-1ubuntu2.7
VMware Tanzu Operations Manager - update to 3.0.8
vim-X11 - update to 8.2-20
vim-filesystem - update to 8.2-20
vim-common - update to 8.2-20
vim-minimal - update to 8.2-20
vim-debugsource - update to 8.2-20
vim-enhanced - update to 8.2-20
vim-debuginfo - update to 8.2-20
vim - update to 8.2-20
vim - addressed in versions 8.2.4386-1.fc34, 8.2.4386-1.fc35, 8.2.4428-1.fc34, 8.2.4460-1.fc34
vim - update to 9.0.1160-1.1
macOS - update to 13.0 22A380

External References

Related Security Bulletins