CVE-2021-3115 json
Arbitrary code injection via the go command with cgo on Windows in cmd/go
published 2021-01-26 5 y ago modified 2026-09-08 2 mo ago also BIT-golang-2021-3115 , EUVD-2021-26467 , GO-2021-0068
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 6.9%
- EPSS 6.9% chance of exploitation in 30 days, percentile 94%
- public exploits
- 0
- none known
Summary
Go before 1.14.14 and 1.15.x before 1.15.7 on Windows is vulnerable to Command Injection and remote code execution when using the "go get" command to fetch modules that make use of cgo (for example, cgo can execute a gcc program from an untrusted download).
Patch / fix
- bitnami golang 1.14.14, 1.15.7
- go toolchain 1.14.14, 1.15.7
- golang go 1.14.14, 1.15.7
- golang-1.15 Debian 11 1.15.7-1
debian advisories DEBIAN-CVE-2021-3115
- delve RHEL 8 1.5.0-2.module+el8.4.0+8864+58b0fcdb
- golang RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- go-toolset RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- golang-bin RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- golang-src RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- golang-misc RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- golang-race RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
- golang-tests RHEL 8 1.15.7-1.module+el8.4.0+9580+3b0e6c24
red hat advisories RHSA-2021:1746RHSA-2021:2095RHSA-2021:1339
- go1.15 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +7 more 1.15.7-1.17.1
- go1.14 SLES for SAP 15 SP1, SLES 15 SP1-LTSS, SLES 15 SP1-BCL +7 more 1.14.14-1.32.1
suse advisories SUSE-SU-2021:0223-1SUSE-SU-2021:0222-1
- go1.14 openSUSE Tumbleweed 1.14.15-1.6
- go1.15 openSUSE Tumbleweed 1.15.15-1.2
- go1.14 openSUSE Leap 15.2 1.14.14-lp152.2.18.1
- go1.15 openSUSE Leap 15.2 1.15.7-lp152.8.1
- go1.14 openSUSE Leap 15.1 1.14.14-lp151.28.1
opensuse advisories openSUSE-SU-2024:10807-1openSUSE-SU-2024:10808-1openSUSE-SU-2021:0194-1openSUSE-SU-2021:0192-1openSUSE-SU-2021:0190-1
- delve Rocky Linux 8 1.5.0-2.module+el8.4.0+396+d2d16ae3
- golang Rocky Linux 8 1.15.7-1.module+el8.4.0+396+d2d16ae3
- go-toolset Rocky Linux 8 1.15.7-1.module+el8.4.0+396+d2d16ae3
rocky linux advisories RLSA-2021:1746
- go Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 1.15.7-r0
alpine advisories ALPINE-CVE-2021-3115
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-tensorboard Azure Linux 3.0 2.16.2-1
azure linux advisories AZL-38572
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- go Arch Linux 2:1.15.7-1
arch linux advisories AVG-1481
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3115 updated cvss 7.5
golang: cmd/go: packages using cgo can cause arbitrary code execution at build time
-
Red Hat OpenShift Serverless knative-serving knative-serving, knative-eventing knative-eventingaffected: workaround, no fix available “The flaw can be mitigated by making sure "." is not in your PATH environment variable.”
-
Red Hat Ceph Storage 2 golang, grafana, golang-bin, golang-srcaffected: workaround, no fix planned “The flaw can be mitigated by making sure "." is not in your PATH environment variable.”
-
Red Hat Ceph Storage 3 golang, grafana, golang-bin, golang-src, grafana-container, prometheus-node-exporteraffected: workaround, no fix available, no fix planned “The flaw can be mitigated by making sure "." is not in your PATH environment variable.”
-
Red Hat Ceph Storage 4 rhceph/rhceph-4-dashboard-rhel8 Red Hat Enterprise Linux 7 golang, golang-bin, golang-src, golang-misc, golang-testsaffected: workaround, no fix planned “The flaw can be mitigated by making sure "." is not in your PATH environment variable.”
-
Red Hat Enterprise Linux 9 golang, go-toolset, golang-bin, golang-src, golang-misc, golang-race, +1 moreaffected: workaround, no fix available “The flaw can be mitigated by making sure "." is not in your PATH environment variable.”
-
Red Hat Openshift Serverless 1.14 openshift-serverless-1/client-kn-rhel8 0.20.0-9, openshift-serverless-1/serving-queue-rhel8 0.20.0-8, openshift-serverless-1/eventing-mtping-rhel8 0.20.0-8, openshift-serverless-1/kourier-control-rhel8 0.20.0-6, openshift-serverless-1/serving-webhook-rhel8 0.20.0-8, openshift-serverless-1/eventing-webhook-rhel8 0.20.0-8, +25 morefixed: vendor fix “The flaw can be mitigated by making sure "." is not in your PATH environment variable.” RHSA-2021:1338
-
Red Hat Enterprise Linux AppStream (v. 8) delve 1.5.0-2.module+el8.4.0+8864+58b0fcdb, golang 1.15.7-1.module+el8.4.0+9580+3b0e6c24, go-toolset 1.15.7-1.module+el8.4.0+9580+3b0e6c24, golang-bin 1.15.7-1.module+el8.4.0+9580+3b0e6c24, golang-src 1.15.7-1.module+el8.4.0+9580+3b0e6c24, golang-misc 1.15.7-1.module+el8.4.0+9580+3b0e6c24, +2 morefixed: vendor fix “The flaw can be mitigated by making sure "." is not in your PATH environment variable.” RHSA-2021:1746
-
Red Hat OpenShift Serverless 1.0 openshift-serverless-clients 0.20.0-6.el8, openshift-serverless-clients 0.20.0-7.el8fixed: vendor fix “The flaw can be mitigated by making sure "." is not in your PATH environment variable.” RHSA-2021:1339
show 2 moreshow fewer
-
Red Hat OpenShift Serverless 1.10 openshift-serverless-1/client-kn-rhel8 0.16.1-4, openshift-serverless-1/serving-queue-rhel8 0.16.0-6, openshift-serverless-1/kourier-control-rhel8 0.16.0-7, openshift-serverless-1/serving-webhook-rhel8 0.16.0-6, openshift-serverless-1/ingress-rhel8-operator 1.10.2-1, openshift-serverless-1/kn-cli-artifacts-rhel8 0.16.1-4, +9 morefixed: vendor fix “The flaw can be mitigated by making sure "." is not in your PATH environment variable.” RHSA-2021:2021
-
Red Hat Distributed Tracing Jaeger 1 jaeger-rhel7-operator, jaeger-rhel8-operator, distributed-tracing/jaeger-all-in-one-rhel7, distributed-tracing/jaeger-all-in-one-rhel8 Red Hat OpenShift Service Mesh 1 kiali, servicemesh, servicemesh-mixc, servicemesh-mixs, servicemesh-galley, servicemesh-citadel, +5 more Red Hat OpenShift Service Mesh 2.0 kiali, servicemesh, servicemesh-mixc, servicemesh-mixs, servicemesh-istioctl, servicemesh-operator, +2 more Red Hat Enterprise Linux 7 cpp, gcc, libgo, gcc-go, libgcc, libitm, +15 more Red Hat Enterprise Linux 9 go-toolset Red Hat OpenShift Container Platform 3.11 atomic-openshift, atomic-openshift-pod, atomic-openshift-node, atomic-openshift-tests, atomic-openshift-master, atomic-openshift-clients, +7 morenot affected: vulnerable code not present
+4 more productsfewer
Red Hat OpenShift Container Platform 4 openshift, openshift-clients, openshift-kubelet, openshift-hyperkube, openshift-kube-apiserver, openshift-kube-scheduler, +2 more Red Hat Openshift Container Storage 4 mcg, ocs4/cephcsi-rhel8, ocs4/mcg-rhel8-operator, ocs4/ocs-rhel8-operator, ocs4/ocs-must-gather-rhel8, ocs4/rook-ceph-rhel8-operator Red Hat OpenShift Virtualization 2 kubevirt-virtctl Red Hat Storage 3 etcd, golang, heketi, grafana, golang-bin, golang-src, +5 more
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
6.91% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 5.1 | AV:N/AC:H/Au:N/C:P/I:P/A:P |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | golang | <1.14.14 >=1.15.0, <1.15.7 |
1.14.14 1.15.7 |
| go | toolchain | <1.14.14 >=1.15.0-0, <1.15.7 |
1.14.14 1.15.7 |
Classification
- Weakness
-
- CWE-427 Uncontrolled Search Path Element
References
-
go.dev
/cl/284783
patch
-
go.googlesource.com
/go/+/953d1feca9b21af075ad5fc8a3dad096d3ccc3a0
patch
-
go.dev
/cl/284780
patch
-
go.googlesource.com
/go/+/46e2e2e9d99925bbf724b12693c6d3e27a95d6a0
patch
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/YWAYJGXWC232SG3UR3TR574E6BP3OSQQ/
vendor-advisory, web
-
security.gentoo.org
/glsa/202208-02
vendor-advisory, third-party-advisory, advisory
-
blog.golang.org
/path-security
vendor-advisory, advisory
-
groups.google.com
/g/golang-announce/c/mperVMGa98w
release-notes, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20210219-0001/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-3115
web
-
go.dev
/issue/43783
report
-
groups.google.com
/g/golang-announce/c/mperVMGa98w/m/yo5W5wnvAAAJ
web
Sources
- CVE List CVE-2021-3115
- NVD CVE-2021-3115
- OSV BIT-golang-2021-3115
- OSV GO-2021-0068
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.