CVEfocus › CVE database › CVE-2018-16874

CVE-2018-16874

CVSS 6.8 MediumEPSS 5.0% (higher than 92% of CVEs)Published 2018-12-14Updated 2024-08-05Assigner: redhat

In Go before 1.10.6 and 1.11.x before 1.11.3, the "go get" command is vulnerable to directory traversal when executed with the import path of a malicious Go package which contains curly braces (both '{' and '}' characters). Specifically, it is only vulnerable in GOPATH mode, but not in module mode (the distinction is documented at https://golang.org/cmd/go/#hdr-Module_aware_go_get). The attacker can cause an arbitrary filesystem write, which can lead to code execution.

CWE-20

What to do

Fixed builds are available from Go: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
8Fix pending
6Will not fix
8Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 18.04golang-1.10Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 18.04golang-1.8Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 18.04golang-1.9Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 16.04golang-1.10Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 16.04golang-1.6Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 14.04golangFix pending
Ubuntu 14.04golang-1.10Fix pendingUBUNTU-CVE-2018-16874
Ubuntu 14.04golang-1.6Fix pending
Red Hat Enterprise Linux 8go-toolsetNot affected
Red Hat Enterprise Linux 8golangNot affected
Red Hat Enterprise Linux 8golang-binNot affected
Red Hat Enterprise Linux 8golang-docsNot affected
Red Hat Enterprise Linux 8golang-miscNot affected
Red Hat Enterprise Linux 8golang-raceNot affected
Red Hat Enterprise Linux 8golang-srcNot affected
Red Hat Enterprise Linux 8golang-testsNot affected
Red Hat Enterprise Linux 7golangWill not fix
Will not fix
Red Hat Enterprise Linux 7golang-binWill not fix
Will not fix
Red Hat Enterprise Linux 7golang-docsWill not fix
Will not fix
Red Hat Enterprise Linux 7golang-miscWill not fix
Will not fix
Red Hat Enterprise Linux 7golang-srcWill not fix
Will not fix
Red Hat Enterprise Linux 7golang-testsWill not fix
Will not fix
Go librarytoolchainFixed1.11.3GO-2022-0190

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.