Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2019-12735

Опубликовано: 05 июн. 2019
Источник: redhat
CVSS3: 5.3
EPSS Средний

Описание

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.

It was found that the :source! command was not restricted by the sandbox mode. If modeline was explicitly enabled, opening a specially crafted text file in vim could result in arbitrary command execution.

Отчет

To be successfully and automatically triggered when a specially crafted file is opened, this vulnerability requires 3 parts :

  1. The source! command inability to check if it is running in sandbox mode (the fix commit prevents this)
  2. The modeline to be enabled (by default, modeline is disabled when running with root permission. See Mitigation steps to disable the modeline)
  3. A function, to be inserted in the modeline, that can be used to trigger the source! command (e.g.: assert_fail() in the public reproducer). To the best of our knowledge, no such functions were found in the default installation of Red Hat Enterprise Linux versions 5, 6 and 7 at the time of the flaw. However, Red Hat Enterprise Linux version 8 contains assert_fail(). Without part 2 or 3, it would be required for an attacker to be able to craft the command line used to open the crafted file, in order to trigger the vulnerability.

Меры по смягчению последствий

The vulnerability can be triggered only if modeline is enabled. You can check whether modeline is enabled within vim via the command :set modeline? It can be turned off explicitly by adding set nomodeline in a vimrc file.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 5vimOut of support scope
Red Hat Enterprise Linux 6vimFixedRHSA-2019:177415.07.2019
Red Hat Enterprise Linux 7vimFixedRHSA-2019:161927.06.2019
Red Hat Enterprise Linux 7.4 Extended Update SupportvimFixedRHSA-2019:194730.07.2019
Red Hat Enterprise Linux 7.5 Extended Update SupportvimFixedRHSA-2019:179316.07.2019
Red Hat Enterprise Linux 8vimFixedRHSA-2019:161927.06.2019
Red Hat Enterprise Linux 8vimFixedRHSA-2019:161927.06.2019

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-94
https://bugzilla.redhat.com/show_bug.cgi?id=1718308vim/neovim: ': source!' command allows arbitrary command execution via modelines

EPSS

Процентиль: 98%
0.56629
Средний

5.3 Medium

CVSS3

Связанные уязвимости

CVSS3: 8.6
ubuntu
больше 6 лет назад

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.

CVSS3: 8.6
nvd
больше 6 лет назад

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote attackers to execute arbitrary OS commands via the :source! command in a modeline, as demonstrated by execute in Vim, and assert_fails or nvim_input in Neovim.

CVSS3: 8.6
msrc
почти 5 лет назад

Описание отсутствует

CVSS3: 8.6
debian
больше 6 лет назад

getchar.c in Vim before 8.1.1365 and Neovim before 0.3.6 allows remote ...

suse-cvrf
около 6 лет назад

Security update for neovim

EPSS

Процентиль: 98%
0.56629
Средний

5.3 Medium

CVSS3