CVE-2018-16874

golang: "go get" vulnerable to directory traversal via malicious package

Published Dec 14, 2018 CVSS 3.1 · 8.1 High EPSS 5.0% KEV · Not listed
Description
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.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2591-1 golang-1.7 security update
Debian DLA Debian DLA DLA-2592-1 golang-1.8 security update
History

No history.

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Aug 5, 2024, 10:32 AM
Reserved
Sep 11, 2018, 12:00 AM
Status
Modified
Published
Dec 14, 2018, 2:29 PM
Modified
Jun 17, 2026, 1:44 AM
Severity
Moderate
Public date
Dec 13, 2018, 8:00 PM