Vim feedkeys() and writefile() functions shell command execution
| vim-feedkeyswritefile-command-execution (34012) |
Description:
Vim could allow a remote attacker to execute arbitrary commands on the system, caused by a vulnerability in the modelines feature when handling the feedkeys() and writefile() functions. An attacker could exploit this vulnerability by creating a specially-crafted file containing shell metacharacters which would allow the attacker to inject and execute arbitrary shell commands on the system with the privileges of the victim, if the attacker could persuade the victim to open the malicious file.
Platforms Affected:
- Canonical, Ubuntu 6.10
- Canonical, Ubuntu 7.04
- Debian, Debian Linux 3.1
- Debian, Debian Linux 4.0
- MandrakeSoft, Mandrake Linux 2007
- MandrakeSoft, Mandrake Linux 2007 X86_64
- MandrakeSoft, Mandrake Linux 2007.1 X86_64
- MandrakeSoft, Mandrake Linux 2007.1
- MandrakeSoft, Mandrake Linux 2008.0 X86_64
- RedHat, Enterprise Linux 5 Client Workstation
- RedHat, Enterprise Linux 5
- RedHat, Enterprise Linux 5 Server
- RedHat, Enterprise Linux 5 Client
- Vim, Vim 7.0.219 and prior
Remedy:
Upgrade to the latest version of Vim (7.0.235 or later), available from the Vim Web site. See References.
For Ubuntu Linux:
Refer to USN-463-1 for patch, upgrade, or suggested workaround information. See References.
For Mandrake Linux:
Refer to MDKSA-2007:101 for patch, upgrade, or suggested workaround information. See References.
For Red Hat Linux:
Refer to RHSA-2007:0346 for patch, upgrade, or suggested workaround information. See References.
For Debian GNU/Linux (vim):
Refer to DSA-1364-1 for patch, upgrade, or suggested workaround information. See References.
For Debian GNU/Linux (vim):
Refer to DSA-1364-2 for patch, upgrade, or suggested workaround information. See References.
For other distributions:
Contact your vendor for upgrade or patch information.
Consequences:
Gain Access
References:
- Vim Web site, Vim at http://www.vim.org/.
- vim-dev Mailing List, 2007-04-26 21:35:07, feedkeys() allowed in sandbox at http://marc.info/?l=vim-dev&m=117762581821298&w=2.
- BID-23725: Vim Feedkeys and Writefile Functions Remote Code Execution Vulnerabilities
- CVE-2007-2438: The sandbox for vim allows dangerous functions such as (1) writefile, (2) feedkeys, and (3) system, which might allow user-assisted attackers to execute shell commands and write files via modelines.
- DSA-1364: vim -- several vulnerabilities
- FrSIRT/ADV-2007-1599: Vim Modelines feedkeys() and writefile() Arbitrary Command Execution Vulnerability
- MDKSA-2007:101: Updated bind packages fix vulnerability
- RHSA-2007-0346: Moderate: vim security update
- SA25024: Vim Modelines "feedkeys()" Shell Command Execution
- SECTRACK ID: 1018035: Vim Sandbox Functions Let Remote Users Execute Arbitrary Commands
- SUSE-SR:2007:012: SUSE Security Summary Report
- USN-463-1: vim vulnerability
Reported:
Apr 26, 2007
The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.
Copyright (c) 1994-2008 Internet Security Systems, Inc. All rights reserved worldwide.
For corrections or additions please email xforce@iss.net
