CVE-2023-39320: Arbitrary code execution via go.mod toolchain directive in cmd/go
Vulnerability summary
CVE-2023-39320 is a critical (CVSS 9.8) Improper Control of Generation of Code vulnerability in go toolchain cmd/go. EPSS estimates a 1.76% chance of exploitation in the next 30 days, higher than 77.9% of scored vulnerabilities.
Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 6Timeline
- 08-09-2023PublishedVulnerability first disclosed.
- 13-02-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.76%
Chance of exploitation in the next 30 days
Percentile
78%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.76% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- go≥ 1.21.0, < 1.21.1-r0
Chainguard1 product
- metrics-server< 0.6.4-r1
Go1 product
- toolchain≥ 1.21.0-0, < 1.21.1
Go toolchain1 product
- cmd/go≥ 1.21.0-0, < 1.21.1
Golang1 product
- go≥ 1.21.0, < 1.21.1
Ubuntu1 product
- golang-1.21< 1.21.1-1~ubuntu20.04.1 | < 1.21.1-1~ubuntu22.04.1 | < 1.21.5-1
Wolfi1 product
- metrics-server< 0.6.4-r1
7 vendors · 7 products
References
11 links- security.netapp.com/advisory/ntap-20231020-0004/Third Party Advisory