cve.bz

CVE-2018-16874 Path traversal

8.1 highEPSS 5.0%Fix available

High (8.1). EPSS 5.0% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.10.6, 1.11.3.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
5.0% (unchanged from 5.0% a week ago; 5.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-20 Improper Input Validation
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control, A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-16874 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-16874?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-16874?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-16874 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
golang:gobefore 1.10.6
golang:gofrom 1.11.0 before 1.11.3
opensuse:backports_sle15.0
opensuse:leap15.0
opensuse:leap15.1
opensuse:leap42.3
suse:linux_enterprise_server12
debian:debian_linux9.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2022-0190Gotoolchain<1.10.6
>=1.11.0-0 <1.11.3
1.10.6, 1.11.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian9golang-1.71.7.4-2+deb9u3DLA-2591-1
Debian9golang-1.81.8.1-1+deb9u3DLA-2592-1
Ubuntu14.04:LTSgolang-1.10no fix listedUBUNTU-CVE-2018-16874
Ubuntu16.04:LTSgolang-1.6, golang-1.10no fix listedUBUNTU-CVE-2018-16874
Ubuntu18.04:LTSgolang-1.8, golang-1.9, golang-1.10no fix listedUBUNTU-CVE-2018-16874
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 11 moredocker-stable24.0.9_ce-150000.1.25.1SUSE-SU-2025:03545-1
SUSELinux Enterprise Module for Containers 12containerd1.2.5-16.17.2SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12containerd1.4.4-16.38.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12docker18.09.6_ce-98.37.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12docker20.10.6_ce-98.66.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-1.23.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12golang-github-docker-libnetwork0.7.0.1+gitr2726_872f0a83c98a-19.1SUSE-SU-2019:1264-1
SUSELinux Enterprise Module for Containers 12runc1.0.0~rc93-16.8.1SUSE-SU-2021:1458-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSScontainerd1.2.2-16.14.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSdocker18.09.1_ce-98.34.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSdocker-runc1.0.0rc6+gitr3748_96ec2177ae84-1.17.2SUSE-SU-2019:0573-1
SUSELinux Enterprise Module for Containers 12, OpenStack Cloud 6-LTSSgolang-github-docker-libnetwork0.7.0.1+gitr2711_2cfbf9b1f981-16.2SUSE-SU-2019:0573-1
26 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.0containerd1.2.5-lp150.4.14.3openSUSE-SU-2019:1499-1
openSUSELeap 15.0docker18.09.6_ce-lp150.5.17.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-lp150.5.21.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.12-lp150.2.11.1openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.111.11.9-lp150.9.3openSUSE-SU-2019:1499-1
openSUSELeap 15.0go1.121.12.4-lp150.2.2openSUSE-SU-2019:1499-1
openSUSELeap 15.0golang-github-docker-libnetwork0.7.0.1+gitr2726_872f0a83c98a-lp150.3.14.1openSUSE-SU-2019:1499-1
openSUSELeap 15.1containerd1.2.5-lp151.2.3.1openSUSE-SU-2019:1444-1
openSUSELeap 15.1cri-o1.17.1-lp151.2.2openSUSE-SU-2020:0554-1
openSUSELeap 15.1cri-tools1.18.0-lp151.2.1openSUSE-SU-2020:0554-1
openSUSELeap 15.1docker18.09.6_ce-lp151.2.3.1openSUSE-SU-2019:1444-1
openSUSELeap 15.1docker-runc1.0.0rc6+gitr3804_2b18fe1d885e-lp151.3.3.1openSUSE-SU-2019:1444-1
22 more for openSUSE in the JSON and on openSUSE's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the version of golang package in Red Hat Enterprise Linux 7. The golang package, previously available in the Optional channel, will no longer receive updates in Red Hat Enterprise Linux 7. Developers are encouraged to use the Go Toolset instead, which is available through the Red Hat Developer program. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.6_release_notes/chap-red_hat_enterprise_linux-7.6_release_notes-deprecated_functionality_in_rhel7#idm139716309923696

ProductPackageStateAdvisory
Red Hat Ceph Storage 2golangWill not fix
Red Hat Ceph Storage 3golangWill not fix
Red Hat Enterprise Linux 7golangWill not fix
Red Hat Enterprise Linux 8go-toolset:rhel8/golangNot affected
Red Hat OpenStack Platform 8 (Liberty) Operational ToolsgolangWill not fix
Red Hat OpenStack Platform 9 (Mitaka) Operational ToolsgolangWill not fix
Red Hat Storage 3golangWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-16874.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON