← Vulnerability feed

Vulnerability record · CVE-2018-7187 · published 16 February 2018

CVE-2018-7187: Go 'go get' -insecure option allows OS command injection via unvalidated import path

Golang · Go

The 'go get' implementation in Go 1.9.4, when the -insecure command-line option is used, fails to validate the import path; get/vcs.go only checks for '://' anywhere in the string. A crafted web site can supply a malicious import path that leads to arbitrary OS command execution. This matters because developers running 'go get -insecure' against attacker-influenced input can have their machine compromised.

8.8 CVSS 3.1 High EPSS 63% · top 0.8% CWE-78 · OS command injection
8.8CVSS 3.1 base score, v2 9.3
63%EPSS exploitation probability, 30 days
NoNot in CISA KEV
2Affected product versions listed by NVD
12References, 2 tagged exploit
17 Jun 2026Last modified by NVD

Description

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: high.

high priorityCVSS 8.8 with network reachability and high EPSS plus a public exploit reference, though exploitation requires the victim to run 'go get -insecure'.

What it is

The 'go get' implementation in Go 1.9.4, when the -insecure command-line option is used, fails to validate the import path; get/vcs.go only checks for '://' anywhere in the string. A crafted web site can supply a malicious import path that leads to arbitrary OS command execution. This matters because developers running 'go get -insecure' against attacker-influenced input can have their machine compromised.

Impact

An attacker can execute arbitrary operating system commands on the machine of a user who runs 'go get -insecure' with a crafted import path, leading to full compromise of that host under the user's privileges.

Attack surface

Reached remotely over the network (AV:N) with no privileges required (PR:N), but exploitation requires user interaction (UI:R) because the victim must run 'go get -insecure' against the crafted import path, typically delivered via a malicious web site.

Exploitation

CISA KEV does not list this CVE, but EPSS is high (0.63027, 99.164th percentile) and the GitHub issue reference is tagged 'Exploit', indicating public exploit material exists.

What to do

  • Upgrade Go to a version that validates the import path in get/vcs.go; apply the vendor patch for Go 1.9.4 and later fixed releases.
  • Apply the Debian and Gentoo security updates (DSA-4379, DSA-4380, GLSA 201804-12) on affected Linux distributions.
  • Avoid using the 'go get -insecure' option; remove it from build scripts and developer workflows.
  • Restrict or block outbound 'go get' fetches to untrusted import paths at the network or proxy level.
  • Educate developers not to run 'go get -insecure' against import paths from untrusted or web-sourced input.

Detection

  • Monitor process command lines for 'go get' invocations that include the '-insecure' flag.
  • Alert on child processes spawned by 'go get' that execute shells or unexpected system commands.
  • Review network egress from developer/build hosts for fetches to untrusted VCS or import path hosts.
  • Audit build and CI logs for '-insecure' usage and unusual import path strings containing '://'.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2018-7187 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2023-46604Apache ActiveMQ OpenWire deserialization remote code executionThe Java OpenWire protocol marshaller in Apache ActiveMQ deserializes untrusted data, letting an attacker manipulate serialized class types so the br…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2018-7187), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.