Vulnerabilities > CVE-2018-7187 - OS Command Injection vulnerability in multiple products

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

Summary

The "go get" implementation in Go 1.9.4, when the -insecure command-line option is used, does not validate the import path (get/vcs.go only checks for "://" anywhere in the string), which allows remote attackers to execute arbitrary OS commands via a crafted web site.

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 familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-1_0-0123.NASL
    descriptionAn update of 'go' packages of Photon OS has been released.
    last seen2019-02-08
    modified2019-02-07
    plugin id111927
    published2018-08-17
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=111927
    titlePhoton OS 1.0: Go PHSA-2018-1.0-0123 (deprecated)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1294.NASL
    descriptionIt was discovered that there was an arbitrary command execution vulnerability in the Go programming language. The
    last seen2020-03-17
    modified2018-02-26
    plugin id106985
    published2018-02-26
    reporterThis script is Copyright (C) 2018-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/106985
    titleDebian DLA-1294-1 : golang security update
  • NASL familyAmazon Linux Local Security Checks
    NASL idALA_ALAS-2018-975.NASL
    descriptionArbitrary code execution during
    last seen2020-06-01
    modified2020-06-02
    plugin id108600
    published2018-03-27
    reporterThis script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/108600
    titleAmazon Linux AMI : golang (ALAS-2018-975)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2018-FE65C14082.NASL
    descriptionSecurity fix for CVE-2018-7187 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2019-01-03
    plugin id120938
    published2019-01-03
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/120938
    titleFedora 28 : golang (2018-fe65c14082)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2018-4297-1.NASL
    descriptionThis update for containerd, docker and go fixes the following issues : containerd and docker : Add backport for building containerd (bsc#1102522, bsc#1113313) Upgrade to containerd v1.1.2, which is required for Docker v18.06.1-ce. (bsc#1102522) Enable seccomp support on SLE12 (fate#325877) Update to containerd v1.1.1, which is the required version for the Docker v18.06.0-ce upgrade. (bsc#1102522) Put containerd under the podruntime slice (bsc#1086185) 3rd party registries used the default Docker certificate (bsc#1084533) Handle build breakage due to missing
    last seen2020-03-18
    modified2019-01-02
    plugin id120195
    published2019-01-02
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/120195
    titleSUSE SLED15 / SLES15 Security Update : containerd, docker / go (SUSE-SU-2018:4297-1)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-4380.NASL
    descriptionA vulnerability was discovered in the implementation of the P-521 and P-384 elliptic curves, which could result in denial of service and in some cases key recovery. In addition this update fixes two vulnerabilities in
    last seen2020-03-17
    modified2019-02-04
    plugin id121558
    published2019-02-04
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121558
    titleDebian DSA-4380-1 : golang-1.8 - security update
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201804-12.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201804-12 (Go: Arbitrary code execution) A vulnerability in Go was discovered which does not validate the import path of remote repositories. Impact : Remote attackers, by enticing a user to import from a crafted website, could execute arbitrary commands. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id109056
    published2018-04-16
    reporterThis script is Copyright (C) 2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/109056
    titleGLSA-201804-12 : Go: Arbitrary code execution
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-1_0-0123_GO.NASL
    descriptionAn update of the go package has been released.
    last seen2020-03-17
    modified2019-02-07
    plugin id121818
    published2019-02-07
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121818
    titlePhoton OS 1.0: Go PHSA-2018-1.0-0123
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-2_0-0034.NASL
    descriptionAn update of {'go'} packages of Photon OS has been released.
    last seen2019-02-08
    modified2019-02-07
    plugin id111295
    published2018-07-24
    reporterTenable
    sourcehttps://www.tenable.com/plugins/index.php?view=single&id=111295
    titlePhoton OS 2.0 : go (PhotonOS-PHSA-2018-2.0-0034) (deprecated)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-482.NASL
    descriptionThis update for go1.9 fixes the following issues : Security issues fixed : - CVE-2018-7187: arbitrary command execution via VCS path (boo#1081495) Non-security changes : - Update to version 1.9.7 - fixes to the go command and compiler - minimal support to the go command for the vgo transition
    last seen2020-05-31
    modified2019-03-27
    plugin id123200
    published2019-03-27
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/123200
    titleopenSUSE Security Update : go1.9 (openSUSE-2019-482)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-4379.NASL
    descriptionA vulnerability was discovered in the implementation of the P-521 and P-384 elliptic curves, which could result in denial of service and in some cases key recovery. In addition this update fixes a vulnerability in
    last seen2020-03-17
    modified2019-02-04
    plugin id121557
    published2019-02-04
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121557
    titleDebian DSA-4379-1 : golang-1.7 - security update
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2018-1626.NASL
    descriptionThis update for containerd, docker and go fixes the following issues : containerd and docker : - Add backport for building containerd (bsc#1102522, bsc#1113313) - Upgrade to containerd v1.1.2, which is required for Docker v18.06.1-ce. (bsc#1102522) - Enable seccomp support (fate#325877) - Update to containerd v1.1.1, which is the required version for the Docker v18.06.0-ce upgrade. (bsc#1102522) - Put containerd under the podruntime slice (bsc#1086185) - 3rd party registries used the default Docker certificate (bsc#1084533) - Handle build breakage due to missing
    last seen2020-06-05
    modified2018-12-31
    plugin id119952
    published2018-12-31
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/119952
    titleopenSUSE Security Update : containerd / docker and go (openSUSE-2018-1626)
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2018-672.NASL
    descriptionThis update for go1.9 fixes the following issues : Security issues fixed : - CVE-2018-7187: arbitrary command execution via VCS path (boo#1081495) Non-security changes : - Update to version 1.9.7 - fixes to the go command and compiler - minimal support to the go command for the vgo transition
    last seen2020-06-05
    modified2018-06-25
    plugin id110681
    published2018-06-25
    reporterThis script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/110681
    titleopenSUSE Security Update : go1.9 (openSUSE-2018-672)
  • NASL familyPhotonOS Local Security Checks
    NASL idPHOTONOS_PHSA-2018-2_0-0034_GO.NASL
    descriptionAn update of the go package has been released.
    last seen2020-03-17
    modified2019-02-07
    plugin id121932
    published2019-02-07
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/121932
    titlePhoton OS 2.0: Go PHSA-2018-2.0-0034
  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2019-1044.NASL
    descriptionThis update for containerd, docker and go fixes the following issues : containerd and docker : - Add backport for building containerd (bsc#1102522, bsc#1113313) - Upgrade to containerd v1.1.2, which is required for Docker v18.06.1-ce. (bsc#1102522) - Enable seccomp support (fate#325877) - Update to containerd v1.1.1, which is the required version for the Docker v18.06.0-ce upgrade. (bsc#1102522) - Put containerd under the podruntime slice (bsc#1086185) - 3rd party registries used the default Docker certificate (bsc#1084533) - Handle build breakage due to missing
    last seen2020-06-01
    modified2020-06-02
    plugin id123165
    published2019-03-27
    reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/123165
    titleopenSUSE Security Update : containerd / docker and go (openSUSE-2019-1044)