Command injection in Go programming language - CVE-2018-6574

 

Command injection in Go programming language - CVE-2018-6574

Published: April 25, 2018 / Updated: May 27, 2022


Vulnerability identifier: #VU12162
CSH Severity: Low
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2018-6574
CWE-ID: CWE-77
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary commands on the target system.

The weakness exists due to "go get" remote command execution during source code build, by leveraging the gcc or clang plugin feature, because -fplugin= and -plugin= arguments were not blocked. A remote attacker can execute arbitrary commands.

Affected software

Go programming language
Arch Linux
Gentoo Linux
Amazon Linux AMI
Fedora
Red Hat Enterprise Linux Server
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power
Red Hat Developer Tools
golang-1.8 (Debian package)
go (Alpine package)
golang

How to mitigate CVE-2018-6574

Update to versions 1.8.7, 1.9.4 or 1.10rc2.

golang-1.8 (Debian package) - update to 1.8.1-1+deb9u1
go (Alpine package) - update to 1.9.4-r0
golang - addressed in versions 1.8.7-1.fc26, 1.9.4-1.el6, 1.9.4-1.fc27

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins