FreeBSD : vim -- vulnerabilities in modeline handling (bd9fc2bf-5ffe-11d9-a11a-000a95bc6fae)

High Nessus Plugin ID 19103


The remote FreeBSD host is missing one or more security-related updates.


Ciaran McCreesh discovered news ways in which a VIM modeline can be used to trojan a text file. The patch by Bram Moolenaar reads :

Problem: Unusual characters in an option value may cause unexpected behavior, especially for a modeline. (Ciaran McCreesh)

Solution: Don't allow setting termcap options or 'printdevice' or 'titleold' in a modeline. Don't list options for 'termcap' and 'all' in a modeline. Don't allow unusual characters in 'filetype', 'syntax', 'backupext', 'keymap', 'patchmode' and 'langmenu'.

Note: It is generally recommended that VIM users use set nomodeline in ~/.vimrc to avoid the possibility of trojaned text files.


Update the affected packages.

See Also

Plugin Details

Severity: High

ID: 19103

File Name: freebsd_pkg_bd9fc2bf5ffe11d9a11a000a95bc6fae.nasl

Version: $Revision: 1.13 $

Type: local

Published: 2005/07/13

Modified: 2018/01/12

Dependencies: 12634

Risk Information

Risk Factor: High


Base Score: 7.2

Vector: CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C

Vulnerability Information

CPE: p-cpe:/a:freebsd:freebsd:vim, p-cpe:/a:freebsd:freebsd:vim+ruby, p-cpe:/a:freebsd:freebsd:vim-console, p-cpe:/a:freebsd:freebsd:vim-lite, cpe:/o:freebsd:freebsd

Required KB Items: Host/local_checks_enabled, Host/FreeBSD/release, Host/FreeBSD/pkg_info

Patch Publication Date: 2005/01/06

Vulnerability Publication Date: 2004/12/09

Reference Information

CVE: CVE-2004-1138