cve.bz

CVE-2018-16873 Improper Input Validation

8.1 highEPSS 66%Fix available

High (8.1). EPSS 66% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.10.6, 1.11.3.

On this page
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".

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
66% (unchanged from 66% a week ago; 66% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-16873 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-16873?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-16873?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-16873 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
golang:gobefore 1.10.6
golang:gofrom 1.11.0 before 1.11.3
opensuse:backports_sle15.0
opensuse:leap15.0
opensuse:leap15.1
opensuse:leap42.3
suse:linux_enterprise_server12
debian:debian_linux9.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2022-0189Gotoolchain<1.10.6
>=1.11.0-0 <1.11.3
1.10.6, 1.11.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9golang-1.71.7.4-2+deb9u3DLA-2591-1
Debian9golang-1.81.8.1-1+deb9u3DLA-2592-1
Ubuntu14.04:LTSgolang-1.10no fix listedUBUNTU-CVE-2018-16873
Ubuntu16.04:LTSgolang-1.6, golang-1.10no fix listedUBUNTU-CVE-2018-16873
Ubuntu18.04:LTSgolang-1.8, golang-1.9, golang-1.10no fix listedUBUNTU-CVE-2018-16873
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 moredocker-stable24.0.9_ce-150000.1.25.1SUSE-SU-2025:03545-1
SUSELinux Enterprise Module for Containers 12containerd1.2.5-16.17.2SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12containerd1.4.4-16.38.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12docker18.09.6_ce-98.37.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12docker20.10.6_ce-98.66.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-1.23.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12golang-github-docker-libnetwork0.7.0.1+gitr2726_872f0a83c98a-19.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12runc1.0.0~rc93-16.8.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSScontainerd1.2.2-16.14.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSdocker18.09.1_ce-98.34.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSdocker-runc1.0.0rc6+gitr3748_96ec2177ae84-1.17.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSgolang-github-docker-libnetwork0.7.0.1+gitr2711_2cfbf9b1f981-16.2SUSE-SU-2019:0573-1
26 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.0containerd1.2.5-lp150.4.14.3openSUSE-SU-2019:1499-1
openSUSELeap 15.0docker18.09.6_ce-lp150.5.17.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-lp150.5.21.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.12-lp150.2.11.1openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.111.11.9-lp150.9.3openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.121.12.4-lp150.2.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0golang-github-docker-libnetwork0.7.0.1+gitr2726_872f0a83c98a-lp150.3.14.1openSUSE-SU-2019:1499-1
openSUSELeap 15.1containerd1.2.5-lp151.2.3.1openSUSE-SU-2019:1444-1
openSUSELeap 15.1cri-o1.17.1-lp151.2.2openSUSE-SU-2020:0554-1
openSUSELeap 15.1cri-tools1.18.0-lp151.2.1openSUSE-SU-2020:0554-1
openSUSELeap 15.1docker18.09.6_ce-lp151.2.3.1openSUSE-SU-2019:1444-1
openSUSELeap 15.1docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-lp151.3.3.1openSUSE-SU-2019:1444-1
22 more for openSUSE in the JSON and on openSUSE's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the version of golang package in Red Hat Enterprise Linux 7. The golang package, previously available in the Optional channel, will no longer receive updates in Red Hat Enterprise Linux 7. Developers are encouraged to use the Go Toolset instead, which is available through the Red Hat Developer program. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.6_release_notes/chap-red_hat_enterprise_linux-7.6_release_notes-deprecated_functionality_in_rhel7#idm139716309923696

ProductPackageStateAdvisory
Red Hat Ceph Storage 2golangWill not fix
Red Hat Ceph Storage 3golangWill not fix
Red Hat Enterprise Linux 7golangWill not fix
Red Hat Enterprise Linux 8go-toolset:rhel8/golangNot affected
Red Hat OpenShift Container Platform 3.10atomic-openshiftFix deferred
Red Hat OpenShift Container Platform 3.11atomic-openshiftNot affected
Red Hat OpenShift Container Platform 3.7atomic-openshiftOut of support scope
Red Hat OpenShift Container Platform 3.9atomic-openshiftFix deferred
Red Hat OpenShift Container Platform 4openshiftNot affected
Red Hat OpenStack Platform 8 (Liberty) Operational ToolsgolangWill not fix
Red Hat OpenStack Platform 9 (Mitaka) Operational ToolsgolangWill not fix
Red Hat Storage 3golangWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-16873.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON