Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Medium

Arbitrary File Write in Go "go tool pack" Extraction

IdentifiersCVE-2026-39817CWE-22

CVE-2026-39817 is a path traversal / arbitrary file write vulnerability in the Go toolchain's "go tool pack" subcommand, a minimal archive utility similar to Unix ar and typically used internally by the compiler with trusted inputs. During archive extraction, the subcommand did not sanitize output filenames from archive members. As a result, a crafted malicious archive containing filenames with directory components could cause extracted files to be written outside the intended extraction location to attacker-chosen filesystem paths. Go fixed the issue by changing the pack subcommand to refuse extraction of files whose names contain directory components.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an attacker who can supply a malicious archive to cause arbitrary file writes on the local filesystem in the security context of the user running "go tool pack" extraction. Depending on the target path and surrounding environment, this can overwrite existing files, place files in sensitive locations, corrupt build artifacts, or facilitate follow-on compromise such as configuration manipulation or code execution via overwritten startup or build-related files.

Mitigation

If you can’t patch tonight, do this now.

Do not use "go tool pack" to extract archives from untrusted or unauthenticated sources. Restrict use of the subcommand to trusted compiler-generated inputs as originally intended. Where immediate upgrade is not possible, perform extraction only in isolated environments with minimal filesystem privileges and validate archive member names before processing, rejecting entries containing path separators or directory traversal constructs.

Remediation

Patch, then assume compromise.

Upgrade to a fixed Go release that includes the cmd/go patch for CVE-2026-39817. The fix causes "go tool pack" to reject archive entries whose names contain directory components, preventing writes outside the intended extraction scope. The provided context indicates this fix is included in Go 1.26.3 and Go 1.25.10.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GolangGoapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity2

Community discussion across Reddit, Mastodon, and other social sources.