| Name | CVE-2026-97033 |
| Description | Building a malicious package that uses cgo could cause arbitrary code execution at build time through several compiler and linker flags permitted in "#cgo" directives. Specifically, "--sysroot" in GCC and Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled directory; "-target" in Clang falls back to executing target helper tools from the current working directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a regular file on disk to GNU ld.bfd, which interprets it as a positional linker script; and "-x" permitted specifying arbitrary compiler input languages beyond those supported by cgo. "--sysroot" and "-target" are now disallowed in "#cgo" flags, "-isysroot" and "-Wl,-syslibroot" are verified not to point to regular files, and "-x" is restricted to the C, C++, Objective-C, and assembler languages supported by cgo. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|---|---|---|
| golang-1.19 (PTS) | bookworm | 1.19.8-2 | vulnerable |
| golang-1.24 (PTS) | trixie | 1.24.4-1 | vulnerable |
| golang-1.26 (PTS) | forky, sid | 1.26.11-1 | fixed |
| golang-1.27 (PTS) | forky, sid | 1.27.4-1 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|---|---|---|---|---|---|
| golang-1.19 | source | (unstable) | (unfixed) | |||
| golang-1.24 | source | (unstable) | (unfixed) | |||
| golang-1.26 | source | (unstable) | 1.26.11-1 | |||
| golang-1.27 | source | (unstable) | 1.27.4-1 |
[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/82577
https://github.com/golang/go/commit/8e7ba03754ee2a386ac17439725bcc44bcdb12a7 (go1.27.4)
https://github.com/golang/go/commit/c4a70ad79652b00f2b52e6902507d83de4a480d6 (go1.26.11)