Command injection in Go programming language - CVE-2018-16873
Published: December 14, 2018
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary commands on the target system.
The vulnerability exists in the go get command due to import path of a malicious Go package, or a package that imports it directly or indirectly. A remote unauthenticated attacker can use a vanity import path that ends with "/.git", use custom domains to arrange things so that a Git repository is cloned to a folder named ".git", trick the victim into considering the parent directory as a repository root, and run Git commands on it that will use the "config" file in the original Git repository root for its configuration, and if that config file contains malicious commands, and execute arbitrary code on the system running "go get -u".
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Arch Linux
Gentoo Linux
Amazon Linux AMI
Fedora
SUSE Linux Enterprise Module for Containers
Opensuse
SUSE Linux
openSUSE Leap
SUSE Package Hub for SUSE Linux Enterprise
runc
runc-debuginfo
containerd
golang
etcdctl
etcd
docker
docker-debuginfo
How to mitigate CVE-2018-16873
runc - update to 1.0.0~rc93-16.8.1
runc-debuginfo - update to 1.0.0~rc93-16.8.1
containerd - update to 1.4.4-16.38.1
golang - addressed in versions 1.10.7-1.fc28, 1.11.4-1.el6, 1.11.4-1.el7, 1.11.4-1.fc29, 1.11-6.fc29
etcdctl - update to 3.5.12-150000.7.6.1
etcd - update to 3.5.12-150000.7.6.1
docker - update to 20.10.6_ce-98.66.1
docker-debuginfo - update to 20.10.6_ce-98.66.1
External References
Related Security Bulletins
- Multiple vulnerabilities in Go
- Amazon Linux AMI update for golang
- Arch Linux update for go-pie
- Arch Linux update for go
- OpenSUSE Linux update for go1.11
- Gentoo update for Go
- OpenSUSE Linux update for go1.10
- OpenSUSE Linux update for containerd
- OpenSUSE Linux update for runc
- OpenSUSE Linux update for docker
- OpenSUSE Linux update for runc
- OpenSUSE Linux update for containerd
- OpenSUSE Linux update for containerd
- OpenSUSE Linux update for containerd, docker, docker-runc, go, go1.11, go1.12, golang-github-docker-libnetwork
- OpenSUSE Linux update for containerd, docker, docker-runc, go, go1.11, go1.12, golang-github-docker-libnetwork
- OpenSUSE Linux update for containerd, docker, docker-runc, go, go1.11, go1.12, golang-github-docker-libnetwork
- OpenSUSE Linux update for helm
- OpenSUSE Linux update for kubernetes
- SUSE update for containerd, docker, runc
- SUSE update for etcd
- Fedora 29 update for golang
- Fedora 28 update for golang
- Fedora EPEL 7 update for golang
- Fedora EPEL 6 update for golang
- Fedora 29 Containers update for golang