{"id":"CVE-2026-97034","aliases":["CVE-2026-97034","GO-2026-6857","BIT-GOLANG-2026-97034"],"related":["RHSA-2026:101231","RHSA-2026:102586","RHSA-2026:102587","RHSA-2026:102592","RHSA-2026:99003","RHSA-2026:99004"],"kind":"vulnerability","state":"published","title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-11T02:51:11.000Z","modified":"2026-11-27T06:56:12.290Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-77"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.26.11","status":"affected"},{"type":"semver","introduced":"1.27.0-0","fixed":"1.27.4","status":"affected"}],"vendor":"Go toolchain","product":"cmd/go","package":"cmd/go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.26.11"},{"type":"semver","introduced":"1.27.0-0","status":"affected","fixed":"1.27.4"}],"ecosystem":"Go","package":"toolchain","purl":"pkg:golang/toolchain","source":"go"}],"references":[{"url":"https://go.dev/cl/862147","tags":["fix"],"sources":["cvelist","go","nvd"]},{"url":"https://go.dev/issue/82576","tags":["report"],"sources":["cvelist","go","nvd"]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":["web"],"sources":["cvelist","go","nvd"]},{"url":"https://pkg.go.dev/vuln/GO-2026-6857","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Go","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-16T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-97034","url":"https://www.cve.org/CVERecord?id=CVE-2026-97034","licence":"CVE Terms of Use","modified":"2026-11-17T04:55:30.177Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6857","url":"https://pkg.go.dev/vuln/GO-2026-6857","licence":"CC-BY-4.0","modified":"2026-11-27T06:56:12.290Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-97034","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97034","licence":"Public domain","modified":"2026-11-17T05:18:38.390Z"}],"updatedAt":"2026-11-27T07:27:26.563Z","epss":{"score":0.00828,"percentile":0.58617,"date":"2026-12-01T12:00:22.000Z"}}