VDB
Sign up
—

GO-2022-0203

Remote command execution via "go get" command with "-insecure" option in cmd/go

Quick fix

GO-2022-0203 — toolchain: upgrade to the fixed version with the command below.

go get toolchain@v1.9.5

Details

The "go get" command is vulnerable to remote code execution.

When the -insecure command-line option is used, "go get" does not validate the import path (get/vcs.go only checks for "://" anywhere in the string), which allows remote attackers to execute arbitrary OS commands via a crafted web site.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/toolchain
Introduced in: 0Fixed in: 1.9.5
Fixgo get toolchain@v1.9.5

References