SWIG cgo filename execution in Go cmd/go <1.26.2
CVE-2026-27140 Published on April 8, 2026
Code execution vulnerability in SWIG code generation in cmd/go
SWIG file names containing 'cgo' and well-crafted payloads could lead to code smuggling and arbitrary code execution at build time due to trust layer bypass.
Vulnerability Analysis
CVE-2026-27140 is exploitable with network access, requires user interaction and a small amount of user privileges. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to be critical as this vulnerability has a high impact to the confidentiality, integrity and availability of this component.
Weakness Type
Improper Restriction of Names for Files and Other Resources
The application constructs the name of a file or other resource using input from an upstream component, but it does not restrict or incorrectly restricts the resulting name. This may produce resultant weaknesses. For instance, if the names of these resources contain scripting characters, it is possible that a script may get executed in the client's browser if the application ever displays the name of the resource on a dynamically generated web page. Alternately, if the resources are consumed by some application parser, a specially crafted name can exploit some vulnerability internal to the parser, potentially resulting in execution of arbitrary code on the server machine. The problems will vary based on the context of usage of such malformed resource names and whether vulnerabilities are present in or assumptions are made by the targeted technology that would make code execution possible.
Products Associated with CVE-2026-27140
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2026-27140 are published in these products:
Affected Versions
Go toolchain cmd/go:- Before 1.25.9 is affected.
- Version 1.26.0-0 and below 1.26.2 is affected.
- Version 0:1.25.9-3.el10_1 and below * is unaffected.
- Version 0:1.25.9-1.el10_0 and below * is unaffected.
- Version 8100020260422204008.a3795dee and below * is unaffected.
- Version 8040020260505161557.5081a262 and below * is unaffected.
- Version 8040020260505161557.5081a262 and below * is unaffected.
- Version 8060020260505152018.97d7f71f and below * is unaffected.
- Version 8060020260505152018.97d7f71f and below * is unaffected.
- Version 8060020260505152018.97d7f71f and below * is unaffected.
- Version 8080020260506150958.6b4b45d8 and below * is unaffected.
- Version 8080020260506150958.6b4b45d8 and below * is unaffected.
- Version 0:1.25.9-1.el9_7 and below * is unaffected.
- Version 0:1.17.13-12.el9_0 and below * is unaffected.
- Version 0:1.19.13-25.el9_2 and below * is unaffected.
- Version 0:1.21.13-16.el9_4 and below * is unaffected.
- Version 0:1.25.9-1.el9_6 and below * is unaffected.
- Version 1782184924 and below * is unaffected.
- Version 1780978272 and below * is unaffected.
- Version 1780041462 and below * is unaffected.
- Version 1780040098 and below * is unaffected.
- Version 1780041224 and below * is unaffected.
- Version 1780043978 and below * is unaffected.
- Version 1780040126 and below * is unaffected.
- Version 1780040410 and below * is unaffected.
- Version 1780043779 and below * is unaffected.
- Version 1780041886 and below * is unaffected.
- Version 1780043827 and below * is unaffected.
- Version 1780044940 and below * is unaffected.
- Version 1780044576 and below * is unaffected.
- Version 1780044702 and below * is unaffected.
- Version 1780465170 and below * is unaffected.
- Version 1780043484 and below * is unaffected.
- Version 1780042119 and below * is unaffected.
- Version 1780041614 and below * is unaffected.
- Version 1779779751 and below * is unaffected.
- Version 1780044383 and below * is unaffected.
- Version 1780462567 and below * is unaffected.
- Version 1780044334 and below * is unaffected.
- Version 1780044523 and below * is unaffected.
- Version 1780043476 and below * is unaffected.
- Version 1780040386 and below * is unaffected.
- Version 1780040551 and below * is unaffected.
- Version 1780040374 and below * is unaffected.
- Version 1780040173 and below * is unaffected.
- Version 1780040106 and below * is unaffected.
- Version 1780040431 and below * is unaffected.
- Version 1780040250 and below * is unaffected.
- Version 1780040455 and below * is unaffected.
- Version 1780040569 and below * is unaffected.
- Version 1780040125 and below * is unaffected.
- Version 1780040115 and below * is unaffected.
- Version 1780041802 and below * is unaffected.
- Version 1780040474 and below * is unaffected.
- Version 1780041847 and below * is unaffected.
- Version 1780462866 and below * is unaffected.
- Version 1780043216 and below * is unaffected.
- Version 1780041137 and below * is unaffected.
- Version 1780041696 and below * is unaffected.
- Version 1780456268 and below * is unaffected.
- Version 1780454976 and below * is unaffected.
- Version 1780044088 and below * is unaffected.
- Version 1780043838 and below * is unaffected.
- Version 1780043267 and below * is unaffected.
- Version 1780043688 and below * is unaffected.
- Version 1780042895 and below * is unaffected.
- Version 1780042508 and below * is unaffected.
- Version 1780043788 and below * is unaffected.
- Version 1780077151 and below * is unaffected.
- Version 1780043389 and below * is unaffected.
- Version 1780043841 and below * is unaffected.
- Version 1780040140 and below * is unaffected.
- Version 1780044360 and below * is unaffected.
- Version 1780043742 and below * is unaffected.
- Version 1780044651 and below * is unaffected.
- Version 1780043209 and below * is unaffected.
- Version 1780044985 and below * is unaffected.
- Version 1780043338 and below * is unaffected.
- Version 1780040877 and below * is unaffected.
- Version 1780043417 and below * is unaffected.
- Version 1780043063 and below * is unaffected.
- Version 1780044416 and below * is unaffected.
- Version 1780041673 and below * is unaffected.
- Version 1780077014 and below * is unaffected.
- Version 1780043304 and below * is unaffected.
- Version 1780040117 and below * is unaffected.
- Version 1780040462 and below * is unaffected.
- Version 1780043588 and below * is unaffected.
- Version 1780040365 and below * is unaffected.
- Version 1780044673 and below * is unaffected.
- Version 1780042236 and below * is unaffected.
- Version 1780040315 and below * is unaffected.
- Version 1780044883 and below * is unaffected.
- Version 1780043164 and below * is unaffected.
- Version 1780042603 and below * is unaffected.
- Version 1780365421 and below * is unaffected.
- Version 1780043143 and below * is unaffected.
- Version 1780043821 and below * is unaffected.
- Version 1780042237 and below * is unaffected.
- Version 1780041901 and below * is unaffected.
- Version 1780041003 and below * is unaffected.
- Version 1780041501 and below * is unaffected.
- Version 1780044427 and below * is unaffected.
- Version 1780041753 and below * is unaffected.
- Version 1780040144 and below * is unaffected.
- Version 1780041782 and below * is unaffected.
- Version 1780040459 and below * is unaffected.
- Version 1780041860 and below * is unaffected.
- Version 1780044670 and below * is unaffected.
- Version 1780462456 and below * is unaffected.
- Version 1780043300 and below * is unaffected.
- Version 1780060002 and below * is unaffected.
- Version 1780041279 and below * is unaffected.
- Version 1780041069 and below * is unaffected.
- Version 1780042252 and below * is unaffected.
- Version 1780041162 and below * is unaffected.
- Version 1780040104 and below * is unaffected.
- Version 1780060168 and below * is unaffected.
- Version 1780044706 and below * is unaffected.
- Version 1780041921 and below * is unaffected.
- Version 1780040998 and below * is unaffected.
- Version 1780040920 and below * is unaffected.
- Version 1780040850 and below * is unaffected.
- Version 1780040338 and below * is unaffected.
- Version 1780040138 and below * is unaffected.
- Version 1780044358 and below * is unaffected.
- Version 1780046879 and below * is unaffected.
- Version 1780059431 and below * is unaffected.
- Version 1780365576 and below * is unaffected.
- Version 1780040812 and below * is unaffected.
- Version 1780041732 and below * is unaffected.
- Version 1780044865 and below * is unaffected.
- Version 1780041147 and below * is unaffected.
- Version 1780041460 and below * is unaffected.
- Version 1780462410 and below * is unaffected.
- Version 1780040278 and below * is unaffected.
- Version 1780040161 and below * is unaffected.
- Version 1780040359 and below * is unaffected.
- Version 1780040470 and below * is unaffected.
- Version 1780045070 and below * is unaffected.
- Version 1780384569 and below * is unaffected.
- Version 1780503846 and below * is unaffected.
- Version 1780040131 and below * is unaffected.
- Version 1780041461 and below * is unaffected.
- Version 1780040876 and below * is unaffected.
- Version 1780043841 and below * is unaffected.
- Version 1780040139 and below * is unaffected.
- Version 1780043162 and below * is unaffected.
- Version 1780456062 and below * is unaffected.
- Version 1780040160 and below * is unaffected.
- Version 1780043151 and below * is unaffected.
- Version 1780040143 and below * is unaffected.
- Version 1780040249 and below * is unaffected.
- Version 1780043773 and below * is unaffected.
- Version 1780041035 and below * is unaffected.
- Version 1780041508 and below * is unaffected.
- Version 1780041774 and below * is unaffected.
- Version 1780045015 and below * is unaffected.
- Version 1780044994 and below * is unaffected.
- Version 1780041206 and below * is unaffected.
- Version 1780044407 and below * is unaffected.
- Version 1780040576 and below * is unaffected.
- Version 1780044692 and below * is unaffected.
- Version 1780044330 and below * is unaffected.
- Version 1780045024 and below * is unaffected.
- Version 1780365324 and below * is unaffected.
- Version 1780365279 and below * is unaffected.
- Version 1780042274 and below * is unaffected.
- Version 1780365284 and below * is unaffected.
- Version 1780046352 and below * is unaffected.
- Version 1780056937 and below * is unaffected.
- Version 1780040715 and below * is unaffected.
- Version 1780041386 and below * is unaffected.
- Version 1780040612 and below * is unaffected.
- Version 1780293328 and below * is unaffected.
- Version 1780041754 and below * is unaffected.
- Version 1780040283 and below * is unaffected.
- Version 1780041841 and below * is unaffected.
- Version 1780043953 and below * is unaffected.
- Version 1780043165 and below * is unaffected.
- Version 1780503869 and below * is unaffected.
- Version 1780040471 and below * is unaffected.
- Version 1780044248 and below * is unaffected.
- Version 1780041841 and below * is unaffected.
- Version 1780043624 and below * is unaffected.
- Version 1780466471 and below * is unaffected.
- Version 1780320077 and below * is unaffected.
- Version 1780462550 and below * is unaffected.
- Version 1780040430 and below * is unaffected.
- Version 1780040095 and below * is unaffected.
- Version 1780040502 and below * is unaffected.
- Version 1780040511 and below * is unaffected.
- Version 1780040430 and below * is unaffected.
- Version 1780040095 and below * is unaffected.
- Version 1780040119 and below * is unaffected.
- Version 1780040106 and below * is unaffected.
- Version 1780044606 and below * is unaffected.
- Version 1780044910 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.