All reports
Unknown

Arbitrary code execution via go.mod toolchain directive in cmd/go

Affected versions

Affected versions
>=1.21.0-0 <1.21.1
Fixed version
1.21.1

Exploitation

CVE-2023-39320

Probability of exploitation in the next 30 days: 1.76%

FIRST EPSS · 2026-11-21

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.

Links

Credits

  • Juho Nurminen of Mattermost