CVE-2023-39320

published 8 Sep 2023 · updated 13 Feb 2025

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

5.0MediumEPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 1.21.1.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go toolchain>=1.21.0-0 <1.21.11.21.1

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-39320 severity on Zeptric[![CVE-2023-39320](https://zeptric.io/badge/cve/CVE-2023-39320.svg)](https://zeptric.io/cve/CVE-2023-39320)