Description
The "go tool pack" subcommand (usually used only by the compiler as an internal tool with known-good inputs) does not sanitize output filenames. Extracting a malicious archive file with the "pack" subcommand can write files to arbitrary locations on the filesystem.
Published: 2026-05-07
Score: 5.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The "go tool pack" subcommand, part of the Go toolchain, extracts files from archives without sanitizing the output path names. When a malicious archive contains filenames that navigate backward with sequences such as ../../, the extractor will write or overwrite files at arbitrary locations relative to the current working directory, effectively performing a path traversal. It involves improper input validation and allows writing to arbitrary paths, as identified by CWE-787. The vulnerability can be triggered by any input supplied to the pack command.

Affected Systems

Any installation of the Go compiler that includes the cmd/go executable is potentially affected. No specific version range is cited, so the issue applies to all current releases that have not incorporated a fix for this directory traversal flaw.

Risk and Exploitability

The moderate CVSS score of 5.9 reflects the potential for local arbitrary file creation or overwrite, but the EPSS score of < 1% indicates a very low probability of exploitation. As the vulnerability is not listed in CISA KEV, there are no publicly documented active exploits. The attack requires local execution of "go tool pack" with a crafted archive; remote exploitation through the network is not possible according to the description. While the flaw does not guarantee code execution or privilege escalation, the ability to write to arbitrary files could allow an attacker to deploy malicious files if the environment permits such actions.

Generated by OpenCVE AI on May 13, 2026 at 18:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Go toolchain to the latest release that includes the path‑sanitization fix for the pack subcommand.
  • Limit the use of "go tool pack" to trusted, internally‑generated archives; disallow its invocation on untrusted or third‑party content.
  • Reject archive members that contain path components resolving to parent directories or absolute paths before passing them to the pack command.

Generated by OpenCVE AI on May 13, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 13 May 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20
CWE-22

Wed, 13 May 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Golang
Golang go
Weaknesses CWE-787
CPEs cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Vendors & Products Golang
Golang go

Mon, 11 May 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Gotoolchain
Gotoolchain cmd/go
Vendors & Products Gotoolchain
Gotoolchain cmd/go

Sat, 09 May 2026 02:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20
CWE-22

Sat, 09 May 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
CWE-73

Fri, 08 May 2026 22:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 07 May 2026 21:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
CWE-73

Thu, 07 May 2026 20:00:00 +0000

Type Values Removed Values Added
Description The "go tool pack" subcommand (usually used only by the compiler as an internal tool with known-good inputs) does not sanitize output filenames. Extracting a malicious archive file with the "pack" subcommand can write files to arbitrary locations on the filesystem.
Title Invoking "go tool pack" does not sanitize output paths in cmd/go
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-05-08T21:29:47.246Z

Reserved: 2026-04-07T18:13:03.524Z

Link: CVE-2026-39817

cve-icon Vulnrichment

Updated: 2026-05-08T16:58:50.713Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-07T20:16:42.983

Modified: 2026-05-13T14:59:28.477

Link: CVE-2026-39817

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-13T18:30:46Z

Weaknesses