CVE-2023-39320
golang: cmd/go: go.mod toolchain directive allows arbitrary execution
Overview
Description
The go.mod toolchain directive, introduced in Go 1.21, can be leveraged to execute scripts and binaries relative to the root of the module when the "go" command was executed within the module. This applies to modules downloaded using the "go" command from the module proxy, as well as modules downloaded directly using VCS software.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-94
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| Bitnami | golang | >=1.21.0, <1.21.1 | 1.21.1 |
Open a package to see all its vulnerabilities.
Operating systems · 11 fixes
SUSE Linux Enterprise 2 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | go1-21 +2 | 1.21.1-150000.1.6.1 | SUSE-SU-2023:3701-1 |
| 15.4 | go1-21-openssl +2 | 1.21.4.1-150000.1.5.1 | SUSE-SU-2023:4469-1 |
| 15.5 | go1-21 +2 | 1.21.1-150000.1.6.1 | SUSE-SU-2023:3701-1 |
| 15.5 | go1-21-openssl +2 | 1.21.4.1-150000.1.5.1 | SUSE-SU-2023:4469-1 |
alpine 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.22 | go | 1.21.1-r0 |
| 3.23 | go | 1.21.1-r0 |
| 3.24 | go | 1.21.1-r0 |
| edge | go | 1.21.1-r0 |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| metrics-server | 0.6.4-r1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | go1-21 +3 | 1.21.1-1.1 | openSUSE-SU-2024:13217-1 |
wolfi 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| metrics-server | 0.6.4-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-39320
- go.dev https://go.dev/cl/526158
- go.dev https://go.dev/issue/62198
- groups.google.com https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-39320
- pkg.go.dev https://pkg.go.dev/vuln/GO-2023-2042
- security.gentoo.org https://security.gentoo.org/glsa/202311-09
- security.netapp.com https://security.netapp.com/advisory/ntap-20231020-0004/
- vuln.go.dev https://vuln.go.dev/ID/GO-2023-2042.json
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-39320
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.