Patchfirst
CVE-2018-7187 EPSS 63.0%

The "go get" implementation in Go 1.9.4, when the -insecure command-line option is used, does not validate the import…

Fix:upgrade toolchain to 1.26.11 or later also fixes CVE-2018-16873, CVE-2026-97040 Details ↓

Summary

The flaw lies in the "go get" command of Go 1.9.4 (the Go toolchain), where the import path validation in get/vcs.go only checks for the presence of "://" anywhere in the string. An attacker who can host a crafted web site can execute arbitrary OS commands on a system where "go get" is run with the -insecure option.

Official description · CVE.org

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.

Breakdown
19.8 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 16 Feb 2018. No public exploit code or confirmed exploitation is recorded.

6 fixes in toolchain over 3 years. The latest fix listed for toolchain is 1.15.5.

Fixes in toolchainGo package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 1.9.1CVE-2017-150415 Oct 2017
  2. 1.9.4CVE-2018-65747 Feb 2018
  3. 1.10.1CVE-2018-718716 Feb 2018
  4. 1.11.3CVE-2018-1687314 Dec 2018
  5. 1.11.3CVE-2018-1687414 Dec 2018
  6. 1.15.5CVE-2020-2836618 Nov 2020Latest listed

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: toolchain.

GotoolchainGO-2022-0203

Upgrade to 1.26.11 or later

Fixes this CVE and 2 other known vulnerabilities in this package (CVE-2018-16873, CVE-2026-97040).

Set the version to Go 1.26.11 or later in your Go toolchain.

First fixed in 1.10.1 for CVE-2018-7187.

Affected versions, by release line

If you runUpgrade to
1.10.0-0 up to 1.10.11.26.11first fix for this CVE: 1.10.1
All versions before 1.9.5

Still affected on this line by CVE-2018-16873 (fixed in 1.10.6, a newer line); CVE-2026-97040 (fixed in 1.26.11, a newer line).

1.9.5

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

6 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close