Description
When using GCC, building a malicious package that uses cgo could cause arbitrary command execution at link time via untrusted GCC spec files ("specs" or "*.spec"). When linking with "-fopenmp", "-fopenacc", or "-fsanitize=" in "#cgo LDFLAGS", GCC's built-in link spec evaluates "%:include(libgomp.spec)" or "%:include(libsanitizer.spec)" and searches for spec files in "-L" and sysroot directories (including subdirectories and multilib sibling directories such as "../lib64"), as well as the working directory when "-fopenmp" or "-fopenacc" is used or when "-fsanitize=" is combined with "-static" or "-static-lib*". The go command now rejects "-L", "-isysroot", and "-Wl,-syslibroot" directories (and the working and package directories when applicable) that contain GCC spec files, and disallows "@" and "-" prefixes in "-fsanitize=" compiler flag values.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Go toolchain | cmd/go | 0 <1.26.11 | — |
| Go toolchain | cmd/go | 1.27.0-0 <1.27.4 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | golang-1.26 +1 | No fix yet | — |
| Debian 13 | golang-1.24 | No fix yet | — |
| Debian 12 | golang-1.19 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | golang-1.26 +1 | No fix yet | — |
| Ubuntu 26.04 LTS | golang-1.23 +3 | No fix yet | — |
| Ubuntu 24.04 LTS | golang-1.21 +5 | No fix yet | — |
| Ubuntu 22.04 LTS | golang-1.17 +8 | No fix yet | — |
| Ubuntu 20.04 LTS | golang-1.13 +5 | No fix yet | — |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | golang-1.8 +2 | No fix yet | — |
| Ubuntu 16.04 LTS | golang-1.6 +1 | No fix yet | — |
| Ubuntu 14.04 LTS | golang-1.10 | No fix yet | — |
| Ubuntu Pro 22.04 LTS | golang-1.13 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | golang-1.16 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | golang-1.13 +2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | golang-1.13 +1 | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | go1.26 | 1.26.11-1.1 | openSUSE-SU-2026:12529-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | toolchain | < 1.26.11 · >= 1.27.0-0, < 1.27.4 | 1.26.11, 1.27.4 | GO-2026-6857 |
Advisories 2
- openSUSE-SU-2026:12529-1 go1.26-1.26.11-1.1 on GA media SUSE / openSUSE Security Updates · Nov 12, 2026
- WID-SEC-2026-4370 Golang Go: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Nov 11, 2026