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

Symlink following in Go cmd/go "go bug" temporary files

IdentifiersCVE-2026-39819CWE-59· Improper Link Resolution Before…

CVE-2026-39819 affects the Go toolchain's cmd/go component. The "go bug" command created two files with predictable names in the system temporary directory (for example, /tmp). Because those filenames were predictable and the command followed symlinks, an attacker with access to that temporary directory could pre-create a symbolic link at one of those paths and cause "go bug" to write to the symlink target instead of a safe temporary file. The Go project fixed this by changing "go bug" to use os.MkdirTemp to create a safe working directory for its temporary files.

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 a local attacker who can manipulate entries in the shared temporary directory to cause arbitrary file overwrite as the user running "go bug". Impact depends on the privileges of that user and the chosen target file, but can include corruption of user files, modification of configuration or shell startup files, and potential follow-on code execution or persistence if a security-sensitive file is overwritten.

Mitigation

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

Until patched, avoid running "go bug" on systems where the temporary directory is shared with untrusted local users. Where operationally feasible, use a private temporary directory with restrictive permissions, or ensure TMPDIR points to a directory not writable by other users. Reducing access to the system temporary directory limits the ability to plant malicious symlinks.

Remediation

Patch, then assume compromise.

Upgrade to a fixed Go release: Go 1.26.3, Go 1.25.10, or later. The upstream fix changes "go bug" to create a dedicated temporary working directory with os.MkdirTemp rather than using predictable filenames in the global temporary directory.
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
GoogleGoapplication

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

ACTIVITY FEED

Recent activity

2 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

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.