CVE-2018-16874
mediumpriority · track · 34EPSS 0.050 · 92 %ileEURUUSEPSS · scored 2026-10-27
In Go before 1.10.6 and 1.11.x before 1.11.3, the "go get" command is vulnerable to directory traversal when executed with the import path of a malicious Go package which contains curly braces (both '{' and '}' characters). Specifically, it is only vulnerable in GOPATH mode, but not in module mode (the distinction is documented at https://golang.org/cmd/go/#hdr-Module_aware_go_get). The attacker can cause an arbitrary filesystem write, which can lead to code execution.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.8–8.1
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (21)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GO-2022-0190Directory traversal via "go get" command in cmd/go2022-08-02vendor · osvUS
The "go get" command is vulnerable to directory traversal when executed with the import path of a malicious Go package which contains curly brace (both '{' and '}' characters). Specifically, it is only vulnerable in GOPATH mode, but not in module mode (the distinction is documented at https://golang.org/cmd/go/#hdr-Module_aware_go_get). The attacker can cause an arbitrary filesystem write, which can lead to code execution.
also known as (4)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (52)
External citations — patches, advisories, analysis.
- http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00044.htmlcnnvd
- http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00060.htmlcnnvd
- http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00011.htmlcnnvd
- http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00015.htmlcnnvd
- http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00010.htmlcnnvd
- http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00041.htmlcnnvd
- http://www.securityfocus.com/bid/106228cnnvd
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16874cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan