CVE-2023-39320 | Arbitrary code execution via go.mod toolchain directive in cmd/go

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.

Published: 2023-09-08 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-39320 is rated Moderate Risk (64/100): CVSS Critical severity, with medium exploitation likelihood (EPSS 1.41%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-39320

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.80% 1.41% +0.62%
2 2025-11-21 6.02% 0.80% -5.22%
3 2025-11-18 6.02%

Full EPSS history (21 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-39320

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
9.8 3.1 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 5.9 [email protected]

Weakness enumeration for CVE-2023-39320

OS Trackers for CVE-2023-39320

vendor priority summary link
alpine critical CVE-2023-39320: 1 source package rows (go); 8 state rows across 5 repos (3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 5, open 3. https://security.alpinelinux.org/vuln/CVE-2023-39320
gentoo high CVE-2023-39320: 1 GLSA(s) (202311-09), 1 atom(s) (dev-lang/go); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-39320
redhat high https://access.redhat.com/security/cve/CVE-2023-39320
suse high CVE-2023-39320 severity important: SUSE including 32 source package names (1.21-2.34.5:go1.21-1.21.1-150000.1.6.1, 1.21-2.34.5:go1.21-doc-1.21.1-150000.1.6.1, …), 108 product×package rows across 16 product lines (Container bci/golang, SUSE Enterprise Storage 7.1, … (16 product lines)): Known Not Affected 55, Fixed 53. https://www.suse.com/security/cve/CVE-2023-39320/
ubuntu medium CVE-2023-39320 medium priority: Ubuntu including 13 source packages (golang, golang-1.10, …), 130 status rows across 10 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, trusty, upstream, xenial): DNE 87, not-affected 30, needs-triage 12, released 1. https://ubuntu.com/security/CVE-2023-39320

Affected software / configurations for CVE-2023-39320

Vendor Product Version Raw CPE
golang go >= 1.21.0, < 1.21.1 cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*

References for CVE-2023-39320

cvelogic Threat Intelligence