Skip to content
Fencer Intel
high 7.5

CVE-2021-3115 json

Arbitrary code injection via the go command with cgo on Windows in cmd/go

published 5y ago modified 2mo 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

Is CVE-2021-3115 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

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-eventing
    affected: 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-src
    affected: 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-exporter
    affected: 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-tests
    affected: 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 more
    affected: 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 more
    fixed: 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 more
    fixed: 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.el8
    fixed: vendor fix “The flaw can be mitigated by making sure "." is not in your PATH environment variable.” RHSA-2021:1339
show 2 more
  • 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 more
    fixed: 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 more
    +4 more products
    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
    not affected: vulnerable code not present

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-09).

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

Sources

Fencer Intel 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.