CVE-2026-39817 PUBLISHED

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

Assigner: Go
Reserved: 07.04.2026 Published: 07.05.2026 Updated: 07.05.2026

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.

Product Status

Vendor Go toolchain
Product cmd/go
Versions Default: unaffected
  • affected from 0 to 1.25.10 (excl.)
  • affected from 1.26.0-0 to 1.26.3 (excl.)

Credits

  • Harshit Gupta (Mr HAX)

References

Problem Types

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