CVE-2021-3115
golang: cmd/go: packages using cgo can cause arbitrary code execution at build time
Overview
Description
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).
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness: CWE-427
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | golang | <1.14.14>=1.15.0, <1.15.7 | 1.14.141.15.7 |
Open a package to see all its vulnerabilities.
Operating systems · 18 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | python-tensorboard | 0:2.16.2-1.azl3 |
Oracle Linux 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | go-toolset +7 | 1.15.7-1.module+el8.4.0+20021+8a86d991 |
| 8 | delve | 1.5.0-2.0.1.module+el8.4.0+20021+8a86d991 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | golang +7 | eol | — |
| 8 (go-toolset:rhel8) | go-toolset +7 | 0:1.15.7-1.module+el8.4.0+9580+3b0e6c24 | RHSA-2021:1746 |
| 8 (go-toolset:rhel8) | delve | 0:1.5.0-2.module+el8.4.0+8864+58b0fcdb | RHSA-2021:1746 |
| 9 | go-toolset +7 | affected | — |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | go | 1.15.7-r0 |
| 3.23 | go | 1.15.7-r0 |
| 3.24 | go | 1.15.7-r0 |
| edge | go | 1.15.7-r0 |
debian 3 releases · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 10 | golang-1-11 | affected |
| 11 | golang-1-15 | 1.15.7-1 |
| 9 | golang-1-7 +1 | affected |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | go1-14 +2 | 1.14.15-1.6 | openSUSE-SU-2024:10807-1 |
| Tumbleweed | go1-15 +2 | 1.15.15-1.2 | openSUSE-SU-2024:10808-1 |
rocky 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 (go-toolset:rhel8) | go-toolset +7 | 1.15.7-1.module+el8.4.0+396+d2d16ae3 |
| 8 (go-toolset:rhel8) | delve | 1.5.0-2.module+el8.4.0+396+d2d16ae3 |
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2021:1746
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-3115
- blog.golang.org https://blog.golang.org/path-security
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1918750
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1918761
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3114
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3115
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2021:1746
- groups.google.com https://groups.google.com/g/golang-announce/c/mperVMGa98w
Show all 17 references
- linux.oracle.com https://linux.oracle.com/cve/CVE-2021-3115.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2021-1746.html
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YWAYJGXWC232SG3UR3TR574E6BP3OSQQ/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-3115
- security.gentoo.org https://security.gentoo.org/glsa/202208-02
- security.netapp.com https://security.netapp.com/advisory/ntap-20210219-0001/
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-3115
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.