UNKNOWN Go

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

GO-2023-2042 · BIT-golang-2023-39320 · CVE-2023-39320

Published · Modified

AI SAST

Find this class of vulnerability in your own code

Corgea's AI-native static analysis detects vulnerabilities like this one across your repositories, ranks them by exploitability, and returns review-ready fixes.

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.

Ready to move

Start Securing

Free, no credit card | First findings in minutes