CVE-2023-39320: Arbitrary code execution via go.mod toolchain directive in cmd/go
CVE-2023-39320 affects 1 listed version of Go in the Dawnsentry catalogue.
Affected products and versions
The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.
Go
1 of 250 listed versions are affected. Fixed in 1.21.1. The newest release, 1.27.4, is not affected.
What it is
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:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD)
Published by Go on 8 September 2023. Last changed 17 June 2026.
Sources
Check one version you run: look CVE-2023-39320 up, or pick a product and version in the quick lookup.
Updated 2 December 2026.