{"id":"CVE-2026-97034","aliases":["DEBIAN-CVE-2026-97034","EUVD-2026-123111","GHSA-775q-r7gv-cr2x","GO-2026-6857","openSUSE-SU-2026:12529-1"],"status":"published","title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","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.","epss":{"day":"2026-11-12","score":0.0028,"percentile":0.20688,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-11-11T00:00:00Z","modified":"2026-11-12T17:23:23Z","fixes":[{"ecosystem":"Go","package":"toolchain","fixed_in":["1.26.11","1.27.4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"golang-1.19","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.19.10-1","1.19.10-2","1.19.11-1","1.19.12-1","1.19.12-2","1.19.12-2~bpo11+1","1.19.12-2~bpo12+1","1.19.13-1","1.19.13-1~bpo11+1","1.19.13-1~bpo12+1","1.19.8-2","1.19.9-1"]},{"source":"osv","ecosystem":"Debian:13","package":"golang-1.24","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.12-1","1.24.13-1","1.24.13-2","1.24.4-1","1.24.4-2","1.24.4-3","1.24.4-4","1.24.7-1","1.24.8-1","1.24.9-1"]},{"source":"osv","ecosystem":"Debian:14","package":"golang-1.26","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.26.0-1","1.26.1-1","1.26.10-1","1.26.10-1~bpo13+1","1.26.11-1","1.26.2-1","1.26.2-2","1.26.2-3","1.26.3-1","1.26.3-1~bpo13+1","1.26.3-2","1.26.3-2~bpo13+1","1.26.4-1","1.26.4-1~bpo13+1","1.26.5-1","1.26.5-1~bpo13+1","1.26.6-1","1.26.6-2","1.26.7-1","1.26.7-1~bpo13+1","1.26.8-1","1.26.8-1~bpo13+1","1.26.8-2","1.26.9-1","1.26.9-1~bpo13+1","1.26~rc2-1","1.26~rc3-1","1.26~rc3-2"]},{"source":"osv","ecosystem":"Debian:14","package":"golang-1.27","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.27.0-1","1.27.0-1~bpo13+1","1.27.1-1","1.27.1-2","1.27.1-2~bpo13+1","1.27.2-1","1.27.2-1~bpo13+1","1.27.2-1~bpo13+2","1.27.3-1","1.27.3-1~bpo13+1","1.27.4-1","1.27~rc1-1","1.27~rc2-1","1.27~rc3-1"]},{"source":"osv","ecosystem":"Go","package":"toolchain","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.26.11"},{"introduced":"1.27.0-0"},{"fixed":"1.27.4"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"go1.26","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.26.11-1.1"}]}],"bundled":12}],"products":[{"vendor":"go toolchain","product":"cmd/go"}],"references":[{"url":"https://go.dev/cl/862147","tags":["fix"]},{"url":"https://go.dev/issue/82576","tags":["report"]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":["web"]},{"url":"https://pkg.go.dev/vuln/GO-2026-6857"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97034"},{"url":"https://github.com/advisories/GHSA-775q-r7gv-cr2x"},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-97034","tags":["advisory"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97033","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97034","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97035","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97036","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97037","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97038","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97039","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97040","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97041","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97042","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97043","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97054","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-97034","title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","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.","status":"published","published":"2026-11-11T03:13:17.194Z","modified":"2026-11-11T03:13:17.194Z","updated_at":"2026-11-11T04:22:54.647883Z"}],"euvd":[{"id":"EUVD-2026-123111","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.","status":"published","published":"2026-11-11T03:13:17Z","modified":"2026-11-11T03:13:17Z","updated_at":"2026-11-11T08:27:52.334831Z"}],"ghsa":[{"id":"GHSA-775q-r7gv-cr2x","title":"When using GCC, building a malicious package that uses cgo could cause arbitrary command...","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.","status":"published","published":"2026-11-11T06:32:38Z","modified":"2026-11-11T06:32:47Z","updated_at":"2026-11-11T07:02:43.25695Z"}],"nvd":[{"id":"CVE-2026-97034","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.","status":"published","published":"2026-11-11T05:19:57.397Z","modified":"2026-11-11T05:19:57.397Z","updated_at":"2026-11-11T07:23:51.781546Z"}],"osv":[{"id":"DEBIAN-CVE-2026-97034","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.","status":"published","published":"2026-11-11T05:19:57.397Z","modified":"2026-11-11T07:47:33.669322978Z","updated_at":"2026-11-11T08:27:16.400656Z"},{"id":"GO-2026-6857","title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","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\").\n\nWhen 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*\".\n\nThe 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.","status":"published","published":"2026-11-11T02:51:11Z","modified":"2026-11-11T03:15:14.79374982Z","updated_at":"2026-11-11T03:52:51.074362Z"},{"id":"openSUSE-SU-2026:12529-1","title":"go1.26-1.26.11-1.1 on GA media","description":"These are all security issues fixed in the go1.26-1.26.11-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-11-11T00:00:00Z","modified":"2026-11-12T17:23:23.015967912Z","updated_at":"2026-11-12T18:02:05.26944Z"}]}}
