{"id":"CVE-2026-97034","aliases":["GO-2026-6857"],"title":"Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go","titleSource":"Go","descriptionSource":"OSV","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.","severity":"unknown","score":null,"published":"2026-11-11T02:51:11.000Z","modified":"2026-11-11T03:15:14.793Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Go","name":"toolchain","sources":[{"name":"OSV · GO-2026-6857","url":"https://osv.dev/vulnerability/GO-2026-6857"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"1.26.11"},{"introduced":"1.27.0-0"},{"fixed":"1.27.4"}],"type":"SEMVER"}],"versions":[],"fixed":["1.26.11","1.27.4"]}],"sourceAffected":[],"references":["https://go.dev/cl/862147","https://go.dev/issue/82576","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6857"],"sources":[{"name":"CVE","id":"CVE-2026-97034","modified":"2026-11-11T03:13:17.194Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-97034"},{"name":"OSV","id":"GO-2026-6857","modified":"2026-11-11T03:15:14.793749820Z","url":"https://osv.dev/vulnerability/GO-2026-6857"}],"assessments":[],"cve":{"records":[{"id":"CVE-2026-97034","source":"Go","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-09-23T23:04:46.550Z","published":"2026-11-11T03:13:17.194Z","modified":"2026-11-11T03:13:17.194Z"}],"publishers":[{"name":"Go","role":"CNA","organizationId":"1bb62c36-49e3-4200-9d77-64a1400537cc","modified":"2026-11-11T03:13:17.194Z"}],"references":[{"url":"https://go.dev/cl/862147","tags":[],"source":"Go"},{"url":"https://go.dev/issue/82576","tags":[],"source":"Go"},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":[],"source":"Go"},{"url":"https://pkg.go.dev/vuln/GO-2026-6857","tags":[],"source":"Go"}],"weaknesses":[],"applicability":[],"prioritization":[]},"products":[{"vendor":"Go toolchain","name":"cmd/go","platforms":[],"versions":[{"version":"0","status":"affected","lessThan":"1.26.11","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.4","versionType":"semver"}],"defaultStatus":"unaffected","cpes":[],"source":"Go","url":"https://www.cve.org/CVERecord?id=CVE-2026-97034"}],"remediation":[],"observedAt":"2026-11-11T06:56:07.945Z","kev":{"status":"not-listed","checkedAt":"2026-11-14T23:35:33.875Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-11T07:35:37.131Z","attemptedAt":"2026-11-11T07:35:37.131Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-11T07:35:37.791Z","attemptedAt":"2026-11-11T07:35:37.791Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-11T07:35:38.445Z","attemptedAt":"2026-11-11T07:35:38.445Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-11T07:35:37.130Z","attemptedAt":"2026-11-11T07:35:37.130Z"}],"evidence":[{"source":"NVD","id":"CVE-2026-97034","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97034","modified":"2026-11-11T05:19:57.397","checkedAt":"2026-11-11T07:35:37.131Z"},{"source":"GitHub Advisory Database","id":"GHSA-775q-r7gv-cr2x","url":"https://github.com/advisories/GHSA-775q-r7gv-cr2x","modified":"2026-11-11T06:32:47Z","checkedAt":"2026-11-11T07:35:37.791Z"},{"source":"ENISA EUVD","id":"EUVD-2026-123111","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123111","modified":"Nov 11, 2026, 6:32:38 AM","checkedAt":"2026-11-11T07:35:38.445Z"}],"aiSummary":null}