
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-27140 is a code smuggling vulnerability in Go's cmd/go component that allows arbitrary code execution at build time by exploiting a trust layer bypass via specially crafted SWIG filenames containing 'cgo'. It affects Go versions prior to 1.25.9 and versions 1.26.0 through 1.26.1 (prior to 1.26.2). The vulnerability was published on April 8, 2026, and carries a CVSS v3.1 base score of 8.8 (High) (GitHub Advisory, pkg.go.dev).
The root cause is classified as CWE-863 (Incorrect Authorization), specifically a trust boundary bypass in Go's build toolchain (cmd/go). When Go processes SWIG-generated interface files, it fails to correctly validate filenames containing the string 'cgo', allowing an attacker to craft a malicious SWIG file whose name tricks the build system into treating embedded payloads as trusted cgo directives. This results in arbitrary code being executed at build time without proper authorization checks. The fix is tracked in Go issue #78335 and code change CL 763768 (GitHub Advisory, pkg.go.dev).
Successful exploitation results in arbitrary code execution on the developer's or CI/CD build machine at build time, with full confidentiality, integrity, and availability impact. An attacker who can introduce a malicious SWIG file into a Go project's dependency chain or source tree can compromise the entire build environment, potentially exfiltrating source code, secrets, or credentials, injecting backdoors into build artifacts, or disrupting the build pipeline. The scope of impact extends beyond the immediate build host to any downstream systems that consume the compromised build artifacts (GitHub Advisory, Feedly).
There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the time of publication (GitHub Advisory). Exploitation requires user interaction — specifically, a developer or automated build system must build a Go project that includes the malicious SWIG file. The EPSS score is approximately 0.008–0.015%, indicating a low near-term exploitation probability. No threat actor attribution has been reported, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory, pkg.go.dev).
wrapper_cgo.swig). Embed a well-crafted payload within the file that exploits the trust boundary bypass in Go's cmd/go build processing.go build or equivalent on the affected project. User interaction (initiating a build) is required.cmd/go incorrectly authorizes the malicious SWIG filename as a trusted cgo source, causing the embedded payload to execute arbitrary code in the context of the build environment — enabling credential theft, backdoor installation, or artifact tampering (GitHub Advisory, pkg.go.dev)..swig or .swigcxx) with 'cgo' in the filename in project source trees or dependency caches; unexpected modifications to generated cgo files (e.g., _cgo_gotypes.go, _cgo_export.h) not matching known-good checksums.go build execution (e.g., shell commands, network utilities like curl, wget, or nc); unexpected outbound network connections originating from the build process.cmd/go related to SWIG file processing.Upgrade Go to version 1.25.9 or later (for the 1.25.x branch) or 1.26.2 or later (for the 1.26.x branch) to receive the patch (pkg.go.dev, golang-announce). All developers and CI/CD build environments should be updated to a patched Go version. As an interim measure, audit all SWIG files in your project and dependency chain — particularly any with 'cgo' in the filename — and implement code review controls for dependency changes. Vendor advisories from Red Hat, SUSE, openSUSE, and Amazon Linux have also issued updated packages for their respective distributions (Red Hat, openSUSE).
The Go team disclosed the vulnerability via the golang-announce mailing list and published a fix in Go 1.25.9 and 1.26.2 (golang-announce). The vulnerability was also discussed on oss-security (oss-sec) and picked up by downstream Linux distributions including Red Hat, SUSE, openSUSE, Amazon Linux, and Rocky Linux, which issued their own security advisories. Community coverage has been moderate, with vulnerability tracking sites and security blogs noting the build-time code execution risk, though no significant controversy or widespread alarm has been reported given the lack of known active exploitation.
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
golang-1.13
bionic (esm-infra)
golang-1.10
devel
golang-1.23
focal (esm-apps)
golang-1.16
focal (esm-infra)
golang-1.13
jammy
golang-1.13
jammy (esm-apps)
golang-1.13
noble
golang-1.21
OpenShift
el9:openshift4/ose-docker-builder-rhel9-0:v4.16.0
RHEL 8
:appstream:go-toolset:rhel8/golang/go-toolset
RHEL 9
:appstream:golang-0:1.17.13-12.el9_0.src
RHEL 10
golang-0:1.25.9-1.el10_0.src
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."