Vulnerabilities > CVE-2017-11109 - Use After Free vulnerability in VIM 8.0

047910
CVSS 7.8 - HIGH
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
local
low complexity
vim
CWE-416
nessus

Summary

Vim 8.0 allows attackers to cause a denial of service (invalid free) or possibly have unspecified other impact via a crafted source (aka -S) file. NOTE: there might be a limited number of scenarios in which this has security relevance.

Vulnerable Configurations

Part Description Count
Application
Vim
1

Common Weakness Enumeration (CWE)

Nessus

  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1030.NASL
    descriptionVim 8.0 allows attackers to cause a denial of service (invalid free) or possibly have unspecified other impact via a crafted source (aka -S) file. For Debian 7
    last seen2020-03-17
    modified2017-07-19
    plugin id101791
    published2017-07-19
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/101791
    titleDebian DLA-1030-1 : vim security update
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-1030-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(101791);
      script_version("3.6");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2017-11109");
    
      script_name(english:"Debian DLA-1030-1 : vim security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Vim 8.0 allows attackers to cause a denial of service (invalid free)
    or possibly have unspecified other impact via a crafted source (aka
    -S) file.
    
    For Debian 7 'Wheezy', these problems have been fixed in version
    2:7.3.547-7+deb7u4.
    
    We recommend that you upgrade your vim packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2017/07/msg00023.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/vim"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-athena");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-dbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gnome");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gtk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gui-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-lesstif");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-nox");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-runtime");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-tiny");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/07/18");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/07/19");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"7.0", prefix:"vim", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-athena", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-common", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-dbg", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-doc", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-gnome", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-gtk", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-gui-common", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-lesstif", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-nox", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-runtime", reference:"2:7.3.547-7+deb7u4")) flag++;
    if (deb_check(release:"7.0", prefix:"vim-tiny", reference:"2:7.3.547-7+deb7u4")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1871.NASL
    descriptionSeveral minor issues have been fixed in vim, a highly configurable text editor. CVE-2017-11109 Vim allows attackers to cause a denial of service (invalid free) or possibly have unspecified other impact via a crafted source (aka -S) file. CVE-2017-17087 Vim sets the group ownership of a .swp file to the editor
    last seen2020-06-01
    modified2020-06-02
    plugin id127480
    published2019-08-12
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/127480
    titleDebian DLA-1871-1 : vim security update
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-1871-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(127480);
      script_version("1.2");
      script_cvs_date("Date: 2019/09/24 11:01:32");
    
      script_cve_id("CVE-2017-11109", "CVE-2017-17087", "CVE-2019-12735");
    
      script_name(english:"Debian DLA-1871-1 : vim security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Several minor issues have been fixed in vim, a highly configurable
    text editor.
    
    CVE-2017-11109
    
    Vim allows attackers to cause a denial of service (invalid free) or
    possibly have unspecified other impact via a crafted source (aka -S)
    file.
    
    CVE-2017-17087
    
    Vim sets the group ownership of a .swp file to the editor's primary
    group (which may be different from the group ownership of the original
    file), which allows local users to obtain sensitive information by
    leveraging an applicable group membership.
    
    CVE-2019-12735
    
    Vim did not restrict the `:source!` command when executed in a
    sandbox.
    
    For Debian 8 'Jessie', these problems have been fixed in version
    2:7.4.488-7+deb8u4.
    
    We recommend that you upgrade your vim packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2019/08/msg00003.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/jessie/vim"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-athena");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-dbg");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gnome");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gtk");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-gui-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-lesstif");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-nox");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-runtime");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:vim-tiny");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/07/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2019/08/03");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/08/12");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"8.0", prefix:"vim", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-athena", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-common", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-dbg", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-doc", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-gnome", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-gtk", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-gui-common", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-lesstif", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-nox", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-runtime", reference:"2:7.4.488-7+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"vim-tiny", reference:"2:7.4.488-7+deb8u4")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-4309-1.NASL
    descriptionIt was discovered that Vim incorrectly handled certain sources. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 12.04 ESM, Ubuntu 14.04 ESM and Ubuntu 16.04 LTS (CVE-2017-1110) It was discovered that Vim incorrectly handled certain files. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 12.04 ESM and Ubuntu 14.04 ESM. (CVE-2017-5953) It was discovered that Vim incorrectly handled certain inputs. An attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 16.06 LTS. (CVE-2018-20786) It was discovered that Vim incorrectly handled certain inputs. An attacker could possibly use this issue to cause a denial of service or execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and Ubuntu 19.10. (CVE-2019-20079) It was discovered that Vim incorrectly handled certain files. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 12.04 ESM, Ubuntu 14.04 ESM and Ubuntu 16.04 LTS. (CVE-2017-6349, CVE-2017-6350). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-03-26
    modified2020-03-24
    plugin id134856
    published2020-03-24
    reporterUbuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134856
    titleUbuntu 16.04 LTS / 18.04 LTS / 19.10 : vim vulnerabilities (USN-4309-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-4309-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(134856);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/25");
    
      script_cve_id("CVE-2017-1110", "CVE-2017-11109", "CVE-2017-5953", "CVE-2017-6349", "CVE-2017-6350", "CVE-2018-20786", "CVE-2019-20079");
      script_xref(name:"USN", value:"4309-1");
    
      script_name(english:"Ubuntu 16.04 LTS / 18.04 LTS / 19.10 : vim vulnerabilities (USN-4309-1)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that Vim incorrectly handled certain sources. An
    attacker could possibly use this issue to cause a denial of service.
    This issue only affected Ubuntu 12.04 ESM, Ubuntu 14.04 ESM and Ubuntu
    16.04 LTS (CVE-2017-1110)
    
    It was discovered that Vim incorrectly handled certain files. An
    attacker could possibly use this issue to execute arbitrary code. This
    issue only affected Ubuntu 12.04 ESM and Ubuntu 14.04 ESM.
    (CVE-2017-5953)
    
    It was discovered that Vim incorrectly handled certain inputs. An
    attacker could possibly use this issue to cause a denial of service.
    This issue only affected Ubuntu 16.06 LTS. (CVE-2018-20786)
    
    It was discovered that Vim incorrectly handled certain inputs. An
    attacker could possibly use this issue to cause a denial of service or
    execute arbitrary code. This issue only affected Ubuntu 18.04 LTS and
    Ubuntu 19.10. (CVE-2019-20079)
    
    It was discovered that Vim incorrectly handled certain files. An
    attacker could possibly use this issue to execute arbitrary code. This
    issue only affected Ubuntu 12.04 ESM, Ubuntu 14.04 ESM and Ubuntu
    16.04 LTS. (CVE-2017-6349, CVE-2017-6350).
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the Ubuntu security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/4309-1/"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:vim");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:vim-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:vim-gui-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:vim-runtime");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:14.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:16.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:18.04:-:lts");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:19.10");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/02/10");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/03/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/24");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2020 Canonical, Inc. / NASL script (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(12\.04|14\.04|16\.04|18\.04|19\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 12.04 / 14.04 / 16.04 / 18.04 / 19.10", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"16.04", pkgname:"vim", pkgver:"2:7.4.1689-3ubuntu1.4")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"vim-common", pkgver:"2:7.4.1689-3ubuntu1.4")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"vim-gui-common", pkgver:"2:7.4.1689-3ubuntu1.4")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"vim-runtime", pkgver:"2:7.4.1689-3ubuntu1.4")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"vim", pkgver:"2:8.0.1453-1ubuntu1.3")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"vim-common", pkgver:"2:8.0.1453-1ubuntu1.3")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"vim-gui-common", pkgver:"2:8.0.1453-1ubuntu1.3")) flag++;
    if (ubuntu_check(osver:"18.04", pkgname:"vim-runtime", pkgver:"2:8.0.1453-1ubuntu1.3")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"vim", pkgver:"2:8.1.0875-5ubuntu2.1")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"vim-common", pkgver:"2:8.1.0875-5ubuntu2.1")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"vim-gui-common", pkgver:"2:8.1.0875-5ubuntu2.1")) flag++;
    if (ubuntu_check(osver:"19.10", pkgname:"vim-runtime", pkgver:"2:8.1.0875-5ubuntu2.1")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_HOLE,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "vim / vim-common / vim-gui-common / vim-runtime");
    }
    
  • NASL familyHuawei Local Security Checks
    NASL idEULEROS_SA-2019-2679.NASL
    descriptionAccording to the versions of the vim packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities : - fileio.c in Vim prior to 8.0.1263 sets the group ownership of a .swp file to the editor
    last seen2020-05-08
    modified2019-12-18
    plugin id132214
    published2019-12-18
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/132214
    titleEulerOS 2.0 SP3 : vim (EulerOS-SA-2019-2679)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(132214);
      script_version("1.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/07");
    
      script_cve_id(
        "CVE-2017-11109",
        "CVE-2017-17087"
      );
    
      script_name(english:"EulerOS 2.0 SP3 : vim (EulerOS-SA-2019-2679)");
      script_summary(english:"Checks the rpm output for the updated packages.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote EulerOS host is missing multiple security updates.");
      script_set_attribute(attribute:"description", value:
    "According to the versions of the vim packages installed, the EulerOS
    installation on the remote host is affected by the following
    vulnerabilities :
    
      - fileio.c in Vim prior to 8.0.1263 sets the group
        ownership of a .swp file to the editor's primary group
        (which may be different from the group ownership of the
        original file), which allows local users to obtain
        sensitive information by leveraging an applicable group
        membership, as demonstrated by /etc/shadow owned by
        root:shadow mode 0640, but /etc/.shadow.swp owned by
        root:users mode 0640, a different vulnerability than
        CVE-2017-1000382.(CVE-2017-17087)
    
      - Vim 8.0 allows attackers to cause a denial of service
        (invalid free) or possibly have unspecified other
        impact via a crafted source (aka -S) file. NOTE: there
        might be a limited number of scenarios in which this
        has security relevance.(CVE-2017-11109)
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the EulerOS security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues.");
      # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2019-2679
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?cd4adf96");
      script_set_attribute(attribute:"solution", value:
    "Update the affected vim packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2019/12/18");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/12/18");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:vim-X11");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:vim-common");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:vim-enhanced");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:vim-filesystem");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:vim-minimal");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:2.0");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Huawei Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/sp");
      script_exclude_keys("Host/EulerOS/uvp_version");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    
    release = get_kb_item("Host/EulerOS/release");
    if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS");
    if (release !~ "^EulerOS release 2\.0(\D|$)") audit(AUDIT_OS_NOT, "EulerOS 2.0");
    
    sp = get_kb_item("Host/EulerOS/sp");
    if (isnull(sp) || sp !~ "^(3)$") audit(AUDIT_OS_NOT, "EulerOS 2.0 SP3");
    
    uvp = get_kb_item("Host/EulerOS/uvp_version");
    if (!empty_or_null(uvp)) audit(AUDIT_OS_NOT, "EulerOS 2.0 SP3", "EulerOS UVP " + uvp);
    
    if (!get_kb_item("Host/EulerOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu);
    
    flag = 0;
    
    pkgs = ["vim-X11-7.4.160-2.h8",
            "vim-common-7.4.160-2.h8",
            "vim-enhanced-7.4.160-2.h8",
            "vim-filesystem-7.4.160-2.h8",
            "vim-minimal-7.4.160-2.h8"];
    
    foreach (pkg in pkgs)
      if (rpm_check(release:"EulerOS-2.0", sp:"3", reference:pkg)) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "vim");
    }