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

Arbitrary Code Execution in Go cmd/go via malicious SWIG file names

IdentifiersCVE-2026-27140CWE-829

CVE-2026-27140 is a build-time arbitrary code execution vulnerability in the Go toolchain, specifically in cmd/go's handling of SWIG source files in conjunction with cgo. A specially crafted SWIG source file can exploit a file-naming convention that is trusted within the cgo compiler trust boundary. By smuggling attacker-controlled input through this trusted naming path, an attacker can bypass the intended trust layer and cause arbitrary code to execute during the build process. The issue is a supply-chain and developer-environment risk affecting builds that process malicious SWIG inputs rather than a runtime flaw in compiled Go applications.

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 can result in arbitrary code execution on the system performing the build, such as a developer workstation or CI/CD runner. This can enable compromise of build environments, tampering with produced artifacts, theft of source code or secrets available during builds, and broader software supply-chain compromise.

Mitigation

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

Until patched versions are deployed, avoid building untrusted or third-party SWIG inputs, especially in environments where cgo and SWIG are enabled. Restrict SWIG usage in CI/CD pipelines, isolate build workers, minimize secrets available to build jobs, and review or block suspicious SWIG file names that could trigger the trusted cgo naming convention. If feasible, disable or avoid cgo/SWIG in builds that process untrusted source trees.

Remediation

Patch, then assume compromise.

Upgrade to a fixed Go release that includes the cmd/go security fix, specifically Go 1.26.2, Go 1.25.9, or later patched versions. The fix disallows SWIG files from using the affected file-naming convention relied upon by cgo's trusted processing path.
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
GolangGolangapplication
Rocky LinuxDelveapplication
Rocky LinuxGolangapplication
Rocky LinuxModule.Delveapplication
Rocky LinuxModule.Golangapplication

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 activity12

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