CVE-2026-97034

NameCVE-2026-97034
DescriptionWhen 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
golang-1.19 (PTS)bookworm1.19.8-2vulnerable
golang-1.24 (PTS)trixie1.24.4-1vulnerable
golang-1.26 (PTS)forky, sid1.26.11-1fixed
golang-1.27 (PTS)forky, sid1.27.4-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
golang-1.19source(unstable)(unfixed)
golang-1.24source(unstable)(unfixed)
golang-1.26source(unstable)1.26.11-1
golang-1.27source(unstable)1.27.4-1

Notes

[trixie] - golang-1.24 <no-dsa> (Minor issue)
[bookworm] - golang-1.19 <postponed> (Limited support, minor issue, follow trixie DSAs/point-releases)
https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM/m/KsU1KfWgAQAJ
https://github.com/golang/go/issues/82576
https://github.com/golang/go/commit/c5426cee10abdae95f8f86e22bfff0932c75be79 (go1.27.4)
https://github.com/golang/go/commit/faaa8b62d6d8b08ff164213508cad1be33149ec7 (go1.26.11)

Search for package or bug name: Reporting problems