CVE-2018-16873

In Go before 1.10.6 and 1.11.x before 1.11.3, the "go get" command is vulnerable to remote code execution when executed with the -u flag and the import path of a malicious Go package, or a package that imports it directly or indirectly. 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). Using custom domains, it's possible to arrange things so that a Git repository is cloned to a folder named ".git" by using a vanity import path that ends with "/.git". If the Git repository root contains a "HEAD" file, a "config" file, an "objects" directory, a "refs" directory, with some work to ensure the proper ordering of operations, "go get -u" can be tricked into considering the parent directory as a repository root, and running Git commands on it. That will use the "config" file in the original Git repository root for its configuration, and if that config file contains malicious commands, they will execute on the system running "go get -u".

Published: 2018-12-14 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2018-16873 is rated Moderate Risk (62.9/100): CVSS High severity, with high exploitation likelihood (EPSS 56.80%, 98th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2018-16873

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-11 60.61% 56.80% -3.80%
2 2026-01-16 36.42% 60.61% +24.18%
3 2026-01-05 36.42%

Full EPSS history (36 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2018-16873

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 5.9 [email protected]
7.5 3.0 HIGH
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.6 5.9 [email protected]
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2018-16873

OS Trackers for CVE-2018-16873

vendor priority summary link
alpine high CVE-2018-16873: 1 source package rows (go); 2 state rows across 2 repos (3.22-community, edge-community); fixed 0, open 2. https://security.alpinelinux.org/vuln/CVE-2018-16873
gentoo normal CVE-2018-16873: 1 GLSA(s) (201812-09), 1 atom(s) (dev-lang/go); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2018-16873
redhat medium https://access.redhat.com/security/cve/CVE-2018-16873
suse high CVE-2018-16873 severity important: SUSE including 526 source package names (2.0.2-4.2.20:runc-1.0.0~rc6-1.3.1, 2.4.6-6.1:etcd-3.5.12-150000.7.6.1, …), 1621 product×package rows across 332 product lines (Container containers/milvus, Container rancher/elemental-teal-iso/5.4, … (332 product lines)): Fixed 1454, Known Affected 157, Known Not Affected 10. https://www.suse.com/security/cve/CVE-2018-16873/
ubuntu medium CVE-2018-16873 medium priority: Ubuntu including 6 source packages (golang, golang-1.10, golang-1.11, golang-1.6, golang-1.8, golang-1.9), 114 status rows across 19 suites (bionic, cosmic, disco, eoan, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 97, needs-triage 8, ignored 4, needed 2, released 2, not-affected 1. https://ubuntu.com/security/CVE-2018-16873

Affected software / configurations for CVE-2018-16873

Vendor Product Version Raw CPE
golang go < 1.10.6 cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
golang go >= 1.11.0, < 1.11.3 cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
opensuse backports_sle 15.0 cpe:2.3:a:opensuse:backports_sle:15.0:-:*:*:*:*:*:*
opensuse leap 15.0 cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*
opensuse leap 15.1 cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
opensuse leap 42.3 cpe:2.3:o:opensuse:leap:42.3:*:*:*:*:*:*:*
suse linux_enterprise_server 12 cpe:2.3:o:suse:linux_enterprise_server:12:-:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*

References for CVE-2018-16873

URL Tags
http://lists.opensuse.org/opensuse-security-announce/2019-03/msg00044.html Mailing List Third Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00060.html Mailing List Third Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00011.html Mailing List Third Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00015.html Mailing List Third Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00010.html Mailing List Third Party Advisory
http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00041.html Mailing List Third Party Advisory
http://www.securityfocus.com/bid/106226 Third Party Advisory VDB Entry
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16873 Issue Tracking Third Party Advisory
https://groups.google.com/forum/?pli=1#%21topic/golang-announce/Kw31K8G7Fi0
https://lists.debian.org/debian-lts-announce/2021/03/msg00014.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/03/msg00015.html Mailing List Third Party Advisory
https://security.gentoo.org/glsa/201812-09 Mitigation Third Party Advisory
cvelogic Threat Intelligence