Go Vulnerability Database
GO-2022-0203
Remote command execution via "go get" command with "-insecure" option in cmd/go
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | toolchain | All versions before 1.9.5 (fixed in 1.9.5) From 1.10.0-0 before 1.10.1 (fixed in 1.10.1) |