Description
Vim 3.0 through 7.x before 7.2.010 does not properly escape characters, which allows user-assisted attackers to (1) execute arbitrary shell commands by entering a K keystroke on a line that contains a ";" (semicolon) followed by a command, or execute arbitrary Ex commands by entering an argument after a (2) "Ctrl-]" (control close-square-bracket) or (3) "g]" (g close-square-bracket) keystroke sequence, a different issue than CVE-2008-2712.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | vim | 2:7.2.010-1 | — |
| Debian 13 | vim | 2:7.2.010-1 | — |
| Debian 12 | vim | 2:7.2.010-1 | — |
| Debian 4.0 | vim | 1:7.0-122+1etch5 | DSA-1733-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | vim +4 | 2:7.0.109-4.el5_2.4z | RHSA-2008:0580 |
| RHEL 4 | vim +4 | 1:6.3.046-1.el4_7.5z | RHSA-2008:0617 |
| RHEL 3 | vim +4 | 1:6.3.046-0.30E.11 | RHSA-2008:0617 |
| RHEL 2 | vim +4 | 1:6.0-7.25 | RHSA-2008:0618 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Vim 7.1.314 - Insufficient Shell Escaping Multiple Command Execution Vulnerabilities EDB-32289 · remote · Aug 19, 2008 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 4
- RHSA-2008:0618 Red Hat Security Advisory: vim security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2008:0617 Red Hat Security Advisory: vim security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- RHSA-2008:0580 Red Hat Security Advisory: vim security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
- DSA-1733-1 vim - multiple vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- http://www.vmware.com/security/advisories/VMSA-2009-0004.html
- [vim-dev] 20080903 Patch 7.2.010 mailing-list
- RHSA-2008:0618 vendor-advisory
- [oss-security] 20080915 Re: [oss-list] CVE request (vim) mailing-list
- 31592 third-party-advisory
- 20080825 RE: Arbitrary Code Execution in Commands: K, Control-], g] mailing-list
- USN-712-1 vendor-advisory
- [oss-security] 20080911 Re: [oss-list] CVE request (vim) mailing-list
- oval:org.mitre.oval:def:10894 vdb-entry signature
- 31681 vdb-entry
- [oss-security] 20080915 Re: [oss-list] CVE request (vim) mailing-list
- 32858 third-party-advisory
- 33410 third-party-advisory
- APPLE-SA-2010-03-29-1 vendor-advisory
- RHSA-2008:0580 vendor-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2009-001.htm
- vim-normal-command-execution(44626) vdb-entry
- ADV-2009-0904 vdb-entry
- ADV-2009-0033 vdb-entry
- 20090401 VMSA-2009-0004 ESX Service Console updates for openssl, bind, and vim mailing-list
- http://groups.google.com/group/vim_dev/attach/dd32ad3a84f36bb2/K-arbitrary-command-execution.patch?part=2
- https://bugzilla.redhat.com/show_bug.cgi?id=461927
- http://support.avaya.com/elmodocs2/security/ASA-2008-457.htm
- 32222 third-party-advisory
- http://support.apple.com/kb/HT4077
- 30795 vdb-entry
- oval:org.mitre.oval:def:5812 vdb-entry signature
- http://groups.google.com/group/vim_dev/attach/9290f26f9bc11b33/K-arbitrary-command-execution.patch.v3?part=2
- [oss-security] 20080911 [oss-list] CVE request (vim) mailing-list
- 20080822 Vim: Arbitrary Code Execution in Commands: K, Control-], g] mailing-list
- MDVSA-2008:236 vendor-advisory
- ADV-2008-2780 vdb-entry
- 32864 third-party-advisory
- [vim_dev] 20080824 Bug with v_K and potentially K command mailing-list
- http://www.rdancer.org/vulnerablevim-K.html
- APPLE-SA-2008-10-09 vendor-advisory
- http://support.apple.com/kb/HT3216
- http://groups.google.com/group/vim_dev/browse_thread/thread/1434d0812b5c817e/6ad2d5b50a96668e
- RHSA-2008:0617 vendor-advisory