CVE-2018-16874

Aliases:GO-2022-0190
Advisory lineage Upstream: 0 Downstream: 38
Modified
Published: 14 Dec 2018, 14:00
Last modified:05 Aug 2024, 10:32

Vulnerability Summary

Overall Risk (default)
medium
34/100
CVSS Score
8.1 HIGH
v3.1 (nvd)
EPSS Score
5.74% LOW
6% probability +3.57%
KEV
Not listed
Ransomware
No reports
Public exploits
None found
Dark Web
Not detected

Timeline

14 Dec 2018, 14:00
Published
Vulnerability first disclosed
05 Aug 2024, 10:32
Last Modified
Vulnerability information updated

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.

CVSS Metrics

  • v3.1HIGHScore: 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • v3.0MEDIUMScore: 6.8CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
  • v2.0MEDIUMScore: 6.8AV:N/AC:M/Au:N/C:P/I:P/A:P

EPSS Trends

Current EPSS score: 5.74% Percentile: 91%

Techniques & Countermeasures

  • CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

    The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • CWE-20Improper Input Validation

    The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Affected Systems

  • debiandebian_linux

    9.0

  • golanggo

    < 1.10.6 | ≥ 1.11.0, < 1.11.3

  • Gotoolchain

    ≥ 1.11.0-0, < 1.11.3

  • opensusebackports_sle

    15.0

  • opensuseleap

    15.0 | 15.1 | 42.3

  • suselinux_enterprise_server

    12

  • [unknown]golang

    1.10.6 | 1.11.3

References (16)