{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2018-16874","id":"CVE-2018-16874","title":"Directory traversal via \"go get\" command in cmd/go","description":"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 c","descriptionLong":"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.","published":"2018-12-14T14:00:00.000Z","updated":"2026-10-24T10:30:39.766779425Z","reserved":"2018-09-11T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"redhat","metric":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"redhat"},{"version":"3.0","score":6.8,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N","rating":"medium","source":"redhat.com"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","rating":"medium","source":"NVD"}],"rating":"high","products":["[UNKNOWN] golang"],"affectedProducts":[{"vendor":"[UNKNOWN]","product":"golang","defaultStatus":null,"versions":[{"status":"affected","version":"1.10.6"},{"status":"affected","version":"1.11.3"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"toolchain","purl":"pkg:golang/toolchain","ranges":["<1.10.6",">=1.11.0-0 <1.11.3"],"fixed":["1.10.6","1.11.3"],"advisory":"GO-2022-0190"}],"cwes":["CWE-20","CWE-22"],"aliases":["GO-2022-0190"],"references":[{"url":"https://security.gentoo.org/glsa/201812-09","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Mitigation","Third Party Advisory","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16874","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Third Party Advisory","report"]},{"url":"http://www.securityfocus.com/bid/106228","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory"]},{"url":"https://groups.google.com/forum/?pli=1#%21topic/golang-announce/Kw31K8G7Fi0","tags":["x_refsource_MISC","x_transferred","web"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00044.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00060.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00011.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00015.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00010.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00041.html","tags":["vendor-advisory","x_refsource_SUSE","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00014.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00015.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://go.dev/cl/154101","tags":["fix"]},{"url":"https://go.googlesource.com/go/+/bc82d7c7db83487e05d7a88e06549d4ae2a688c3","tags":["fix"]},{"url":"https://go.dev/issue/29230","tags":["report"]},{"url":"https://groups.google.com/g/golang-announce/c/Kw31K8G7Fi0","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.05039,"epssPercentile":0.92449,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2018-16874","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2018-16874","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2018-16874","ok":true,"note":"1 package"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2018-16874","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["go"],"critical":[],"attention":null}