Summary
Package updates are available for Amazon Linux 2 that fix the following vulnerabilities: CVE-2026-97054: net/http: HTTP/1 server crash due to MaxBytesReader header race CVE-2026-97043: cmd/go, cmd/compile: unexpected code execution via escaped quotes in //go:cgo_ldflag CVE-2026-97042: cmd/cgo, cmd/compile, cmd/link: linker flag injection via cgo_import_dynamic and PE DLL names CVE-2026-97041: cmd/compile, cmd/link: host linker flag injection via //go:cgo_* directives CVE-2026-97040: cmd/go, cmd/link: cgo directive injection via .syso files disguised as Go object files CVE-2026-97039: cmd/go: flag sanitization bypass via "#cgo pkg-config:" directives CVE-2026-97038: cmd/go: arbitrary code execution via crafted .syso files and cgo linker input files CVE-2026-97037: cmd/go: linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo CVE-2026-97035: cmd/go: unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo CVE-2026-97034: cmd/go: arbitrary command execution via GCC spec files in cgo linker search directories CVE-2026-97033: cmd/go: unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags
Fixed packages 7
| Release | Package | Fixed in |
|---|---|---|
| Amazon Linux · 2 | golang | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-bin | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-docs | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-misc | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-shared | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-src | 0:1.26.11-1.amzn2.0.1 |
| Amazon Linux · 2 | golang-tests | 0:1.26.11-1.amzn2.0.1 |
Vulnerabilities 11
-
Critical 9.8
Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link
Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O,…
-
High 8.8
Unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags in cmd/go
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 …
-
High 8.8
Arbitrary command execution via GCC spec files in cgo linker search directories in cmd/go
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 l…
-
High 8.8
Unexpected code execution and arbitrary file write via Clang -gen-* and GCC -gnat* flags in cgo in cmd/go
When using Clang or GCC, building a malicious package that uses cgo could cause unexpected code execution at build time or write files to arbitrary directories via "-gen-*" or "-gnat*" flags in "#cgo" directives. The "-g*" wildcard in the compiler and linker …
-
High 8.8
Linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo in cmd/go
Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via "#cgo LDFLAGS". Split "-Wl," flags that consume a following argument (such as "-Wl,-rpath", "-Wl,--just-symbols"…
-
High 8.8
Arbitrary code execution via crafted .syso files and cgo linker input files in cmd/go
Building a malicious package containing ".syso" files or cgo linker inputs could inject arbitrary linker flags or execute arbitrary code at link time. Linker input files—including ".syso" files, direct object or library inputs in "#cgo LDFLAGS", and libraries…
-
High 8.8
Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link
Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", …
-
High 8.8
Linker flag injection via cgo_import_dynamic and PE DLL names in cmd/cgo, cmd/compile, and cmd/link
Building a malicious package that uses "//go:cgo_import_dynamic" or links against a crafted PE object on Windows could pass unsafe library arguments to the external linker. The compiler only checked the first character of the library name in "//go:cgo_import_…
-
High 8.8
Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile
Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag" directives. When "cmd/cgo" generates "_cgo_gotypes.…
-
High 8.3
Flag sanitization bypass via "#cgo pkg-config:" directives in cmd/go
Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker flags. The pkg-config flag allowlist previously permitted "--with-path=" and "--personality=", allowed "…
-
Medium 5.9
HTTP/1 server crash due to MaxBytesReader header race in net/http
For HTTP/1 servers, when MaxBytesReader's limit is exceeded, "Connection: close" header is automatically set without synchronization, which might race with another header being set explicitly in the server handler. As a result, an HTTP/1 server that utilizes …
References
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97033.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97034.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97035.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97037.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97038.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97039.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97040.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97041.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97042.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97043.html
-
web
https://alas.aws.amazon.com/cve/html/CVE-2026-97054.html