CVE-2026-39817

Invoking "go tool pack" does not sanitize output paths in cmd/go

Published May 7, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-20
CWE-22
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
Type Values Removed Values Added
First Time appeared Gotoolchain
Gotoolchain cmd/go
Vendors & Products Gotoolchain
Gotoolchain cmd/go
Type Values Removed Values Added
Weaknesses CWE-20
CWE-22
Type Values Removed Values Added
Weaknesses CWE-22
CWE-73
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'}

Type Values Removed Values Added
Weaknesses CWE-22
CWE-73
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
Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
May 8, 2026, 9:29 PM
Reserved
Apr 7, 2026, 6:13 PM
Status
Analyzed
Published
May 7, 2026, 8:16 PM
Modified
Nov 11, 2026, 11:10 PM