VDB
Sign up
—

GO-2023-2042

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

Quick fix

GO-2023-2042 — toolchain: upgrade to the fixed version with the command below.

go get toolchain@v1.21.1

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/toolchain
Introduced in: 1.21.0-0Fixed in: 1.21.1
Fixgo get toolchain@v1.21.1

References