CVE-2023-39320 in Golang 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 usin...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Golang | Go | ≥ 1.21.0, < 1.21.1 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2023-39320 |
|---|---|
| BreachSpider ID | BS-2023-GLOBAL-257330-C |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2023-09-08 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-94: Code Injection
Attacker injects arbitrary code that is executed by the application process.
Related attack patterns (CAPEC)
CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94
CAPEC-77 Manipulating User-Controlled Variables via CWE-94
CAPEC-242 Code Injection via CWE-94
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2023-39320 allows attackers to execute arbitrary scripts and binaries by leveraging the go.mod toolchain directive in Go 1.21, posing a significant security risk.
The vulnerability arises from the go.mod toolchain directive, which can be manipulated to execute scripts and binaries relative to the root of the module when the 'go' command is executed. This can occur for modules downloaded via the module proxy or directly using VCS software.
Questions
What is CVE-2023-39320?
CVE-2023-39320 allows attackers to execute arbitrary scripts and binaries by leveraging the go.mod toolchain directive in Go 1.21, posing a significant security risk.
What is the CVSS score for CVE-2023-39320?
CVE-2023-39320 has CVSS 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 1.8%.
Is CVE-2023-39320 actively exploited?
No confirmed active exploitation of CVE-2023-39320 as of 2026-09-25.
How do I remediate CVE-2023-39320?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2023-39320?
CVE-2023-39320 affects Golang Go.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Golang","product":"Go","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.