Out-of-bounds write in Vim - CVE-2021-3770
Published: May 11, 2022
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to a boundary error. A remote attacker can trick the victim to open a specially crafted file, trigger a 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
Gentoo Linux
Amazon Linux AMI
Ubuntu
openEuler
Fedora
vim (Ubuntu package)
vim-enhanced
vim-filesystem
vim-minimal
vim-debugsource
vim-X11
vim-debuginfo
vim-common
vim
app-editors/vim-core
app-editors/vim
app-editors/gvim
How to mitigate CVE-2021-3770
vim (Ubuntu package) - addressed in versions 2:8.0.1453-1ubuntu1.6, 2:8.1.2269-1ubuntu5.3, 2:8.2.2434-1ubuntu1.1
vim-enhanced - update to 8.2-2
vim-filesystem - update to 8.2-2
vim-minimal - update to 8.2-2
vim-debugsource - update to 8.2-2
vim-X11 - update to 8.2-2
vim-debuginfo - update to 8.2-2
vim-common - update to 8.2-2
vim - update to 8.2-2
vim - addressed in versions 8.2.3404-1.fc33, 8.2.3404-1.fc34, 8.2.3404-1.fc35
app-editors/vim-core - update to 9.0.0060
app-editors/vim - update to 9.0.0060
app-editors/gvim - update to 9.0.0060
vim - update to 9.0.1160-1.1
External References
- https://github.com/vim/vim/commit/b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
- https://huntr.dev/bounties/016ad2f2-07c1-4d14-a8ce-6eed10729365
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/J2CJLY3CF55I2ULG2X4ENXLSXAXYW5J4/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X4FFQARG3LGREPDZRI4C7ERQL3RJKEWQ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZFNTMVZCN4TRTTCAXRLVQ7H2P7FYAIZQ/
- http://www.openwall.com/lists/oss-security/2021/10/01/1