Sårbarhet i Vim og Neovim redaktører fører til kjøring av kode under åpning av en ondsinnet fil

In text editors Vim and Neovim was found a vulnerability (CVE-2019-12735), which allows to execute arbitrary code while opening a specially designed file.

The problem manifests itself with the activity of the modeline enabled by default (“: set modeline“), which allows defining editing options in the file being processed. Vulnerability eliminated in Vim 8.1.1365 Og Neovim 0.3.6 releases.

Through modeline, allowed only a limited number of options. If expression is specified as an option value, it is executed in the sandbox mode, which allows using only the simplest safe operations.

Samtidig, De “: Kildecommand is and in it can be used!Modifier to run arbitrary commands from specified file. Og dermed, to execute the code, it is sufficient to indicate in the modeline line a construction of the formset foldexpr = execute (‘\: Kilde! Some_file’):“. In Neovim, execute call is forbidden, Men assert_fails can be used instead.

For eksempel, to executeuname -acommand, simply open a file in Vim or Neovim, the first or last line of which says:

:!uname -a||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="

De “Kilde!%comand will read commands from the current file and, tilsvarende, execute:! Uname -a“. To hide this line from output by the cat utility, can be used escape sequences.

For eksempel, I this prototype of an exploit during operation of a file in vim, created network connection with shell access to victim’s system, but this file will not cause suspicion when outputting to the terminal with the cat utility.

You can check the modeline activity using the: set modeline?Command. To disable vimrc, you can add the lineset nomodeline“. In distributions, the problem is fixed in RHEL, SUSE/openSUSE, Fedora, FreeBSD, Ubuntu, Arch Linux Og ALT. Vulnerability remains uncorrected in Debian.

Kilde: https://nvd.nist.gov

Om Trojan Killer

Carry Trojan Killer Portable på minnepinne. Vær sikker på at du er i stand til å hjelpe din PC motstå eventuelle cyber trusler uansett hvor du går.

Sjekk også

MageCart på Heroku Cloud Platform

Forskere fant flere MageCart Web Skimmers På Heroku Cloud Platform

Forskere ved Malwarebytes rapportert om å finne flere MageCart web skimmere på Heroku Cloud Platform …

Android spyware CallerSpy

CallerSpy spyware masker som en Android-chat program

Trend Micro eksperter oppdaget malware CallerSpy, som masker som en Android-chat program og, …

Legg igjen et svar