{"id":"CVE-2018-16874","published":"2018-12-14T14:00:00Z","modified":"2024-08-05T10:32:54Z","title":"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…","vendor":null,"product":"golang","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.05017,"percentile":0.92452,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"}],"references":[{"url":"https://security.gentoo.org/glsa/201812-09","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16874","tags":["x_refsource_CONFIRM"]},{"url":"http://www.securityfocus.com/bid/106228","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://groups.google.com/forum/?pli=1#%21topic/golang-announce/Kw31K8G7Fi0","tags":["x_refsource_MISC"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00044.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00060.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00011.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00015.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00010.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00041.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00014.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00015.html","tags":["mailing-list","x_refsource_MLIST"]}],"priority":{"score":23.3,"factors":[{"name":"EPSS percentile","points":18.49},{"name":"CVSS severity","points":4.76}]},"affectedVersions":[{"vendor":"[UNKNOWN]","product":"golang","versions":["1.10.6","1.11.3"]}],"affected":[{"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.10.6",">=1.11.0-0, <1.11.3"],"patched":["1.10.6","1.11.3"],"from":["GO-2022-0190"],"provenance":"source"}],"summary":{"text":"The Go toolchain's \"go get\" command, in Go versions before 1.10.6 and 1.11.x before 1.11.3, contains a directory traversal flaw that is exploitable only in GOPATH mode, not module mode. An attacker who can get a user to run \"go get\" on an import path for a malicious Go package containing curly braces can cause an arbitrary filesystem write, which can lead to code execution, with exploitation requiring user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:40:38Z"},"euvd":{"id":"EUVD-2018-8665","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2018-6574","published":"2018-02-07","fixed":"1.9.4","kev":false},{"cve":"CVE-2018-7187","published":"2018-02-16","fixed":"1.10.1","kev":false,"link":{"from":"CVE-2018-7187","to":"CVE-2018-16874","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.10.1","toFixed":"1.10.6","daysApart":301}]}},{"cve":"CVE-2018-16873","published":"2018-12-14","fixed":"1.11.3","kev":false},{"cve":"CVE-2018-16874","published":"2018-12-14","fixed":"1.11.3","kev":false},{"cve":"CVE-2020-28366","published":"2020-11-18","fixed":"1.15.5","kev":false,"link":{"from":"CVE-2018-16874","to":"CVE-2020-28366","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.11.3","toFixed":"1.14.12","daysApart":705}]}},{"cve":"CVE-2020-28367","published":"2020-11-18","fixed":"1.15.5","kev":false,"link":{"from":"CVE-2018-16874","to":"CVE-2020-28367","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:toolchain","fromFixed":"1.11.3","toFixed":"1.14.12","daysApart":705}]}},{"cve":"CVE-2021-3115","published":"2021-01-26","fixed":"1.15.7","kev":false}],"package":"Go:toolchain"}}