Advisory

GO-2022-0203

Also known as: CVE-2018-7187

Summary

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.

Severity

Not rated by the source.

Dates

Published
2022-08-09 23:19 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

toolchain

Go · All systems

Affected

  • introduced 0, fixed 1.9.5, introduced 1.10.0-0, fixed 1.10.1 (semver)

Fixed versions

1.9.5, 1.10.1

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences