CVE-2026-97033

NameCVE-2026-97033
DescriptionBuilding 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.
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/82577
https://github.com/golang/go/commit/8e7ba03754ee2a386ac17439725bcc44bcdb12a7 (go1.27.4)
https://github.com/golang/go/commit/c4a70ad79652b00f2b52e6902507d83de4a480d6 (go1.26.11)

Search for package or bug name: Reporting problems