{"affected":[{"defaultStatus":"unaffected","ecosystem":"https://pkg.go.dev","packageName":"cmd/go","product":"cmd/go","source":"CNA: Go","vendor":"Go toolchain","versions":[{"lessThan":"1.26.11","status":"affected","version":"0","versionType":"semver"},{"lessThan":"1.27.4","status":"affected","version":"1.27.0-0","versionType":"semver"}]}],"cveId":"CVE-2026-97034","cwes":["CWE-77"],"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":null,"exploits":[],"kev":null,"metrics":[],"modifiedAt":1794366797194,"publishedAt":1794366797194,"references":[{"source":"CNA: Go","tags":[],"url":"https://go.dev/cl/862147"},{"source":"CNA: Go","tags":[],"url":"https://go.dev/issue/82576"},{"source":"CNA: Go","tags":[],"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"},{"source":"CNA: Go","tags":[],"url":"https://pkg.go.dev/vuln/GO-2026-6857"}],"remediation":[],"revision":"deac31f539e2c5f0232af7b8dd9e8967c94cdff99d5c4c2feef51864d6f6584f","sources":[{"modifiedAt":1794366797194,"name":"CNA: Go","retrievedAt":1794370192253,"url":"https://www.cve.org/CVERecord?id=CVE-2026-97034"}],"ssvc":null,"status":"published","title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","updatedAt":1794370192253}