CVE-2026-39817: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Go toolchain cmd/go
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.
AI Analysis
Technical Summary
The vulnerability exists in the 'go tool pack' subcommand of the Go toolchain (cmd/go), which fails to properly sanitize output filenames when extracting archive files. This improper limitation of a pathname to a restricted directory (CWE-22) allows an attacker to craft a malicious archive that, when processed by the 'pack' subcommand, can write files outside the intended directory, potentially overwriting or creating files anywhere on the filesystem. The affected versions include 0 up to 1.26.0-0. There is no CVSS score or vendor advisory indicating a patch or remediation status at this time.
Potential Impact
An attacker who can supply a malicious archive to the 'go tool pack' subcommand may cause arbitrary files to be written to locations outside the intended directory. This could lead to overwriting critical files or placing malicious files in sensitive locations. However, since the 'pack' subcommand is usually used internally by the compiler with known-good inputs, exploitation may require specific conditions or attacker control over inputs to this tool.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted archive files with the 'go tool pack' subcommand. Restrict usage of this tool to trusted inputs only.
CVE-2026-39817: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Go toolchain cmd/go
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the 'go tool pack' subcommand of the Go toolchain (cmd/go), which fails to properly sanitize output filenames when extracting archive files. This improper limitation of a pathname to a restricted directory (CWE-22) allows an attacker to craft a malicious archive that, when processed by the 'pack' subcommand, can write files outside the intended directory, potentially overwriting or creating files anywhere on the filesystem. The affected versions include 0 up to 1.26.0-0. There is no CVSS score or vendor advisory indicating a patch or remediation status at this time.
Potential Impact
An attacker who can supply a malicious archive to the 'go tool pack' subcommand may cause arbitrary files to be written to locations outside the intended directory. This could lead to overwriting critical files or placing malicious files in sensitive locations. However, since the 'pack' subcommand is usually used internally by the compiler with known-good inputs, exploitation may require specific conditions or attacker control over inputs to this tool.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted archive files with the 'go tool pack' subcommand. Restrict usage of this tool to trusted inputs only.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Go
- Date Reserved
- 2026-04-07T18:13:03.524Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fcf0c1cbff5d86102bd5b9
Added to database: 5/7/2026, 8:06:25 PM
Last enriched: 5/7/2026, 8:22:17 PM
Last updated: 5/8/2026, 8:14:56 AM
Views: 9
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.