Every CVE Search/ Get API key

CVE-2020-28366

Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

7.5 HighFix available

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.34%Up 0.9 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
5.1 MediumAV:N/AC:H/Au:N/C:P/I:P/A:P
Weakness
CWE-94
Updated
2026-11-02
CVE List No score

Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
CVE-2020-28366
Updated
2026-11-02
EUVDEUVD-2020-20825 No score

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
EUVD-2020-20825
Updated
2026-11-03
GitHub AdvisoriesGHSA-mwfg-6wv9-379f 7.5

Go before 1.14.12 and 1.15.x before 1.15.5 allows Code Injection.

Go before 1.14.12 and 1.15.x before 1.15.5 allows Code Injection.

Record
GHSA-mwfg-6wv9-379f
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSVALPINE-CVE-2020-28366 7.5

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
ALPINE-CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVAZL-38452 7.5

CVE-2020-28366 affecting package python-tensorboard for versions less than 2.16.2-1

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
AZL-38452
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 17 moreShow less
OSVBELL-CVE-2020-28366 7.5

CVE-2020-28366 does not affect BellSoft software

Record
BELL-CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV 7.5

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2020-28366 7.5

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
DEBIAN-CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2020:5333 7.5

Red Hat Security Advisory: go-toolset-1.14-golang security update

Record
RHSA-2020:5333
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2020:5493 7.5

Red Hat Security Advisory: go-toolset:rhel8 security update

Record
RHSA-2020:5493
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVRHSA-2021:0145 7.5

Red Hat Security Advisory: Red Hat OpenShift Serverless Client kn 1.12.0

Record
RHSA-2021:0145
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2020-28366 7.5

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
UBUNTU-CVE-2020-28366
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-golang-2020-28366 No score

Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

Code injection in the go command with cgo before Go 1.14.12 and Go 1.15.5 allows arbitrary code execution at build time via a malicious unquoted symbol name in a linked object file.

Record
BIT-golang-2020-28366
Updated
2026-11-02
OSVGO-2022-0475 No score

Arbitrary code execution in go command with cgo in cmd/go and cmd/cgo

The go command may execute arbitrary code at build time when cgo is in use. This may occur when running go get on a malicious package, or any other command that builds untrusted code.

This can be caused by malicious unquoted symbol name in a linked object file.

Record
GO-2022-0475
Updated
2026-11-02
OSVMGASA-2021-0018 No score

Updated golang packages fix security vulnerabilities

An input validation vulnerability was found in go. From a generated go file (from the cgo tool) it is possible to modify symbols within that object file and specify code instead. An attacker could potentially use this flaw by creating a repository which included malicious pre-built object files that could execute arbitrary code when downloaded and run via "go get" or "go build" whilst building a go project (CVE-2020-28366).

An input validation vulnerability was found in go. If cgo is specified in a go file, it is possible to bypass the validation of arguments to the gcc compiler. An attacker could potentially use this flaw by creating a malicious repository which would execute arbitrary code when downloaded and run via "go get" or "go build" whilst building a go project (CVE-2020-28367).

Record
MGASA-2021-0018
Updated
2026-11-02
OSVopenSUSE-SU-2020:2047-1 No score

Security update for go1.14

This update for go1.14 fixes the following issues:

  • go1.14.12 (released 2020-11-12) includes security fixes to the cmd/go and math/big packages.
    • go#42553 math/big: panic during recursive division of very large numbers (bsc#1178750 CVE-2020-28362)
    • go#42560 cmd/go: arbitrary code can be injected into cgo generated files (bsc#1178752 CVE-2020-28367)
    • go#42557 cmd/go: improper validation of cgo flags can lead to remote code execution at build time (bsc#1178753 CVE-2020-28366)
    • go#42155 time: Location interprets wrong timezone (DST) with slim zoneinfo
    • go#42112 x/net/http2: the first write error on a connection will cause all subsequent write requests to fail blindly
    • go#41991 runtime: macOS-only segfault on 1.14+ with 'split stack overflow'
    • go#41913 net/http: request.Clone doesn't deep copy TransferEncoding
    • go#41703 runtime: macOS syscall.Exec can get SIGILL due to preemption signal
    • go#41386 x/net/http2: connection-level flow control not returned if stream errors, causes server hang

This update was imported from the SUSE:SLE-15:Update update project.

Record
openSUSE-SU-2020:2047-1
Updated
2026-11-02
OSVopenSUSE-SU-2020:2067-1 No score

Security update for go1.14

This update for go1.14 fixes the following issues:

  • go1.14.12 (released 2020-11-12) includes security fixes to the cmd/go and math/big packages.
    • go#42553 math/big: panic during recursive division of very large numbers (bsc#1178750 CVE-2020-28362)
    • go#42560 cmd/go: arbitrary code can be injected into cgo generated files (bsc#1178752 CVE-2020-28367)
    • go#42557 cmd/go: improper validation of cgo flags can lead to remote code execution at build time (bsc#1178753 CVE-2020-28366)
    • go#42155 time: Location interprets wrong timezone (DST) with slim zoneinfo
    • go#42112 x/net/http2: the first write error on a connection will cause all subsequent write requests to fail blindly
    • go#41991 runtime: macOS-only segfault on 1.14+ with 'split stack overflow'
    • go#41913 net/http: request.Clone doesn't deep copy TransferEncoding
    • go#41703 runtime: macOS syscall.Exec can get SIGILL due to preemption signal
    • go#41386 x/net/http2: connection-level flow control not returned if stream errors, causes server hang

This update was imported from the SUSE:SLE-15:Update update project.

Record
openSUSE-SU-2020:2067-1
Updated
2026-11-02
OSVopenSUSE-SU-2020:2139-1 No score

Security update for go1.15

This update for go1.15 fixes the following issues:

  • go1.15.5 (released 2020-11-12) includes security fixes to the cmd/go and math/big packages.
    • go#42553 math/big: panic during recursive division of very large numbers (bsc#1178750 CVE-2020-28362)
    • go#42560 cmd/go: arbitrary code can be injected into cgo generated files (bsc#1178752 CVE-2020-28367)
    • go#42557 cmd/go: improper validation of cgo flags can lead to remote code execution at build time (bsc#1178753 CVE-2020-28366)
    • go#42169 cmd/compile, runtime, reflect: pointers to go:notinheap types must be stored indirectly in interfaces
    • go#42151 cmd/cgo: opaque struct pointers are broken since Go 1.15.3
    • go#42138 time: Location interprets wrong timezone (DST) with slim zoneinfo
    • go#42113 x/net/http2: the first write error on a connection will cause all subsequent write requests to fail blindly
    • go#41914 net/http: request.Clone doesn't deep copy TransferEncoding
    • go#41704 runtime: macOS syscall.Exec can get SIGILL due to preemption signal
    • go#41463 compress/flate: deflatefast produces corrupted output
    • go#41387 x/net/http2: connection-level flow control not returned if stream errors, causes server hang
    • go#40974 cmd/link: sectionForAddress(0xA9D67F) address not in any section file
Record
openSUSE-SU-2020:2139-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:10807-1 No score

go1.14-1.14.15-1.6 on GA media

These are all security issues fixed in the go1.14-1.14.15-1.6 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:10807-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:10808-1 No score

go1.15-1.15.15-1.2 on GA media

These are all security issues fixed in the go1.15-1.15.15-1.2 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:10808-1
Updated
2026-11-02
OSVSUSE-SU-2020:3368-1 No score

Security update for go1.15

This update for go1.15 fixes the following issues:

  • go1.15.5 (released 2020-11-12) includes security fixes to the cmd/go and math/big packages.
    • go#42553 math/big: panic during recursive division of very large numbers (bsc#1178750 CVE-2020-28362)
    • go#42560 cmd/go: arbitrary code can be injected into cgo generated files (bsc#1178752 CVE-2020-28367)
    • go#42557 cmd/go: improper validation of cgo flags can lead to remote code execution at build time (bsc#1178753 CVE-2020-28366)
    • go#42169 cmd/compile, runtime, reflect: pointers to go:notinheap types must be stored indirectly in interfaces
    • go#42151 cmd/cgo: opaque struct pointers are broken since Go 1.15.3
    • go#42138 time: Location interprets wrong timezone (DST) with slim zoneinfo
    • go#42113 x/net/http2: the first write error on a connection will cause all subsequent write requests to fail blindly
    • go#41914 net/http: request.Clone doesn't deep copy TransferEncoding
    • go#41704 runtime: macOS syscall.Exec can get SIGILL due to preemption signal
    • go#41463 compress/flate: deflatefast produces corrupted output
    • go#41387 x/net/http2: connection-level flow control not returned if stream errors, causes server hang
    • go#40974 cmd/link: sectionForAddress(0xA9D67F) address not in any section file
Record
SUSE-SU-2020:3368-1
Updated
2026-11-02
OSVSUSE-SU-2020:3369-1 No score

Security update for go1.14

This update for go1.14 fixes the following issues:

  • go1.14.12 (released 2020-11-12) includes security fixes to the cmd/go and math/big packages.
    • go#42553 math/big: panic during recursive division of very large numbers (bsc#1178750 CVE-2020-28362)
    • go#42560 cmd/go: arbitrary code can be injected into cgo generated files (bsc#1178752 CVE-2020-28367)
    • go#42557 cmd/go: improper validation of cgo flags can lead to remote code execution at build time (bsc#1178753 CVE-2020-28366)
    • go#42155 time: Location interprets wrong timezone (DST) with slim zoneinfo
    • go#42112 x/net/http2: the first write error on a connection will cause all subsequent write requests to fail blindly
    • go#41991 runtime: macOS-only segfault on 1.14+ with 'split stack overflow'
    • go#41913 net/http: request.Clone doesn't deep copy TransferEncoding
    • go#41703 runtime: macOS syscall.Exec can get SIGILL due to preemption signal
    • go#41386 x/net/http2: connection-level flow control not returned if stream errors, causes server hang
Record
SUSE-SU-2020:3369-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
go
Alpine:v3.13
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.14
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.15
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.16
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.17
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.18
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.19
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.20
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.21
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.22
1.15 up to 1.15.5-r0
1.15.5-r0
Show 49 moreShow less
Affected packages
PackageAffectedFixed
go
Alpine:v3.23
1.15 up to 1.15.5-r0
1.15.5-r0
go
Alpine:v3.24
1.15 up to 1.15.5-r0
1.15.5-r0
python-tensorboard
Azure Linux:3
before 2.16.2-1
2.16.2-1
golang
Bitnami
before 1.14.12, 1.15.0 up to 1.15.5
1.14.121.15.5
golang-1.15
Debian:11
before 1.15.5-1
1.15.5-1
toolchain
Go
before 1.14.12, 1.15.0-0 up to 1.15.5
1.14.121.15.5
golang
Mageia:7
before 1.13.15-3.mga7
1.13.15-3.mga7
go-toolset-1.14
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-build
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-bin
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-docs
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-misc
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-race
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-src
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-golang-tests
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
go-toolset-1.14-runtime
Red Hat:devtools:2020
before 0:1.14.12-1.el7_9
0:1.14.12-1.el7_9
delve
Red Hat:enterprise_linux:8::appstream
before 0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
delve-debuginfo
Red Hat:enterprise_linux:8::appstream
before 0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
delve-debugsource
Red Hat:enterprise_linux:8::appstream
before 0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
0:1.4.1-1.module+el8.3.0+7840+63dfb1ed
go-toolset
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-bin
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-docs
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-misc
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-race
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-src
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
golang-tests
Red Hat:enterprise_linux:8::appstream
before 0:1.14.12-1.module+el8.3.0+8784+380394dc
0:1.14.12-1.module+el8.3.0+8784+380394dc
openshift-serverless-clients
Red Hat:serverless:1.0::el8
before 0:0.18.4-2.el8
0:0.18.4-2.el8
go1.15
SUSE:Linux Enterprise Module for Development Tools 15 SP1
before 1.15.5-1.11.1
1.15.5-1.11.1
go1.15
SUSE:Linux Enterprise Module for Development Tools 15 SP2
before 1.15.5-1.11.1
1.15.5-1.11.1
go1.14
SUSE:Linux Enterprise Module for Development Tools 15 SP1
before 1.14.12-1.26.1
1.14.12-1.26.1
go1.14
SUSE:Linux Enterprise Module for Development Tools 15 SP2
before 1.14.12-1.26.1
1.14.12-1.26.1
golang-1.10
Ubuntu:14.04:LTS
All versions, plus listed versions
1.10.4-2ubuntu1~14.04.1
None known
golang-1.10
Ubuntu:16.04:LTS
All versions, plus listed versions
1.10.4-2ubuntu1~16.04.11.10.4-2ubuntu1~16.04.2
None known
golang-1.6
Ubuntu:16.04:LTS
All versions, plus listed versions
1.6-0ubuntu11.6-0ubuntu21.6-0ubuntu31.6-0ubuntu41.6-0ubuntu5
Show 5 moreShow less
1.6.1-0ubuntu11.6.2-0ubuntu5~16.041.6.2-0ubuntu5~16.04.21.6.2-0ubuntu5~16.04.31.6.2-0ubuntu5~16.04.4
None known
golang-1.13
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu1~16.04.21.13.8-1ubuntu1~16.04.31.13.8-1ubuntu1~16.04.3+esm21.13.8-1ubuntu1~16.04.3+esm3
None known
golang-1.10
Ubuntu:18.04:LTS
All versions, plus listed versions
1.10~rc1-11.10~rc1-1ubuntu11.10~rc1-2ubuntu11.10~rc2-1ubuntu11.10-1ubuntu11.10.1-1ubuntu21.10.4-2ubuntu1~18.04.11.10.4-2ubuntu1~18.04.2
None known
golang-1.13
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu1~18.04.21.13.8-1ubuntu1~18.04.31.13.8-1ubuntu1~18.04.41.13.8-1ubuntu1~18.04.4+esm1
None known
golang-1.8
Ubuntu:18.04:LTS
All versions, plus listed versions
1.8.3-2ubuntu11.8.3-2ubuntu1.18.04.1
None known
golang-1.9
Ubuntu:18.04:LTS
All versions, plus listed versions
1.9.1-2ubuntu11.9.2-1ubuntu11.9.2-3ubuntu11.9.3-1ubuntu11.9.4-1ubuntu1
None known
golang-1.13
Ubuntu:20.04:LTS
All versions, plus listed versions
1.13.1-1ubuntu11.13.3-1ubuntu11.13.4-1ubuntu11.13.5-1ubuntu11.13.6-1ubuntu1
Show 5 moreShow less
1.13.6-2ubuntu11.13.7-1ubuntu11.13.8-1ubuntu11.13.8-1ubuntu1.11.13.8-1ubuntu1.2
None known
golang-1.14
Ubuntu:20.04:LTS
All versions, plus listed versions
1.14~beta1-11.14~beta1-21.14~rc1-11.14-11.14.1-1
Show 4 moreShow less
1.14.2-11.14.2-1ubuntu11.14.3-2ubuntu2~20.04.11.14.3-2ubuntu2~20.04.2
None known
golang-1.13
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
1.13.8-1ubuntu21.13.8-1ubuntu2.22.04.11.13.8-1ubuntu2.22.04.1+esm11.13.8-1ubuntu2.22.04.2
None known
go1.14
openSUSE:Leap 15.1
before 1.14.12-lp151.22.1
1.14.12-lp151.22.1
go1.14
openSUSE:Leap 15.2
before 1.14.12-lp152.2.12.1
1.14.12-lp152.2.12.1
go1.15
openSUSE:Leap 15.2
before 1.15.5-lp152.2.1
1.15.5-lp152.2.1
go1.14
openSUSE:Tumbleweed
before 1.14.15-1.6
1.14.15-1.6
go1.15
openSUSE:Tumbleweed
before 1.15.15-1.2
1.15.15-1.2

History

History
RecordedChangedSources
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-28366 is a high vulnerability (CVSS 7.5) in Go Toolchain Cmd/cgo, published November 18, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.34%, the 83rd percentile. Fixed in go 1.15.5-r0.

References

Show 70 moreShow less
MoveEnter Open