Vulnerabilities > CVE-2005-2368 - OS Command Injection vulnerability in VIM Development Group VIM

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
vim-development-group
CWE-78
critical
nessus

Summary

vim 6.3 before 6.3.082, with modelines enabled, allows external user-assisted attackers to execute arbitrary commands via shell metacharacters in the (1) glob or (2) expand commands of a foldexpr expression for calculating fold levels.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Argument Injection
    An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-737.NASL
    descriptionCVE-2005-2368 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id19420
    published2005-08-12
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19420
    titleFedora Core 4 : vim-6.3.086-0.fc4 (2005-737)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-738.NASL
    descriptionCVE-2005-2368 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id19421
    published2005-08-12
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19421
    titleFedora Core 3 : vim-6.3.086-0.fc3 (2005-738)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2005-741.NASL
    description - CVE-2005-2368 This update is supposed to fix GTK2 dependency problems of the vim-6.3.086-0.fc3 package. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id19436
    published2005-08-18
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19436
    titleFedora Core 3 : vim-6.3.086-0.fc3.1 (2005-741)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2005-745.NASL
    descriptionUpdated vim packages that fix a security issue are now available. This update has been rated as having low security impact by the Red Hat Security Response Team. VIM (VIsual editor iMproved) is a version of the vi editor. A bug was found in the way VIM processes modelines. If a user with modelines enabled opens a text file with a carefully crafted modeline, arbitrary commands may be executed as the user running VIM. The Common Vulnerabilities and Exposures project has assigned the name CVE-2005-2368 to this issue. Users of VIM are advised to upgrade to these updated packages, which resolve this issue.
    last seen2020-06-01
    modified2020-06-02
    plugin id21959
    published2006-07-05
    reporterThis script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/21959
    titleCentOS 3 / 4 : vim (CESA-2005:745)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_81F127A8003811DA86BC000E0C2E438A.NASL
    descriptionGeorgi Guninski discovered a way to construct Vim modelines that execute arbitrary shell commands. The vulnerability can be exploited by including shell commands in modelines that call the glob() or expand() functions. An attacker could trick an user to read or edit a trojaned file with modelines enabled, after which the attacker is able to execute arbitrary commands with the privileges of the user. Note: It is generally recommended that VIM users use set nomodeline in ~/.vimrc to avoid the possibility of trojaned text files.
    last seen2020-06-01
    modified2020-06-02
    plugin id19348
    published2005-08-01
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19348
    titleFreeBSD : vim -- vulnerabilities in modeline handling: glob, expand (81f127a8-0038-11da-86bc-000e0c2e438a)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2005-148.NASL
    descriptionA vulnerability was discovered in the way that vim processed modelines. If a user with modelines enabled opened a textfile with a specially crafted modeline, arbitrary commands could be executed.
    last seen2020-06-01
    modified2020-06-02
    plugin id19904
    published2005-10-05
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/19904
    titleMandrake Linux Security Advisory : vim (MDKSA-2005:148)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-745.NASL
    descriptionUpdated vim packages that fix a security issue are now available. This update has been rated as having low security impact by the Red Hat Security Response Team. VIM (VIsual editor iMproved) is a version of the vi editor. A bug was found in the way VIM processes modelines. If a user with modelines enabled opens a text file with a carefully crafted modeline, arbitrary commands may be executed as the user running VIM. The Common Vulnerabilities and Exposures project has assigned the name CVE-2005-2368 to this issue. Users of VIM are advised to upgrade to these updated packages, which resolve this issue.
    last seen2020-06-01
    modified2020-06-02
    plugin id19489
    published2005-08-23
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/19489
    titleRHEL 2.1 / 3 / 4 : vim (RHSA-2005:745)

Oval

accepted2013-04-29T04:13:05.232-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 3
    ovaloval:org.mitre.oval:def:11782
  • commentCentOS Linux 3.x
    ovaloval:org.mitre.oval:def:16651
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 4
    ovaloval:org.mitre.oval:def:11831
  • commentCentOS Linux 4.x
    ovaloval:org.mitre.oval:def:16636
  • commentOracle Linux 4.x
    ovaloval:org.mitre.oval:def:15990
descriptionvim 6.3 before 6.3.082, with modelines enabled, allows external user-assisted attackers to execute arbitrary commands via shell metacharacters in the (1) glob or (2) expand commands of a foldexpr expression for calculating fold levels.
familyunix
idoval:org.mitre.oval:def:11302
statusaccepted
submitted2010-07-09T03:56:16-04:00
titlevim 6.3 before 6.3.082, with modelines enabled, allows external user-assisted attackers to execute arbitrary commands via shell metacharacters in the (1) glob or (2) expand commands of a foldexpr expression for calculating fold levels.
version26

Redhat

advisories
rhsa
idRHSA-2005:745
rpms
  • vim-X11-1:6.3.046-0.30E.4
  • vim-X11-1:6.3.046-0.40E.7
  • vim-common-1:6.3.046-0.30E.4
  • vim-common-1:6.3.046-0.40E.7
  • vim-debuginfo-1:6.3.046-0.30E.4
  • vim-debuginfo-1:6.3.046-0.40E.7
  • vim-enhanced-1:6.3.046-0.30E.4
  • vim-enhanced-1:6.3.046-0.40E.7
  • vim-minimal-1:6.3.046-0.30E.4
  • vim-minimal-1:6.3.046-0.40E.7