SEVERITY NOT PROVIDED EPSS 0.7% · 48th percentile

CVE-2026-97038: Arbitrary code execution via crafted .syso files and cgo linker input files in cmd/go

Published 2026-11-11 · Updated 2026-11-27 · Also known as BIT-golang-2026-97038, GO-2026-6853

Summary

A vulnerability in the Go toolchain (cmd/go) allows arbitrary code execution during the build process via crafted .syso files and cgo linker input files. Developers and organizations using the affected Go toolchain versions should update their environments.

Who is affected

Affected deployments include those using Go toolchain versions prior to 1.26.11 and versions from 1.27.0-0 prior to 1.27.4. Building a malicious package containing improperly formatted .syso files, direct object or library inputs in #cgo LDFLAGS, or libraries in -L directories can lead to arbitrary code execution at link time across platforms.

Exploitability

The severity and CVSS vector are not provided in the vulnerability record. The EPSS score is 0.007 (percentile 0.479), and CISA Known Exploited Vulnerabilities indicates no active exploitation.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-27. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go toolchain >= 0, < 1.26.11 1.26.11 go get [email protected]
Go toolchain >= 1.27.0-0, < 1.27.4 1.27.4 go get [email protected]

FAQ

What causes the arbitrary code execution in cmd/go?

The flaw occurs because linker input files-including .syso files, direct object or library inputs in #cgo LDFLAGS, and libraries in -L directories-were passed to the external linker without validating their format or checking for embedded linker options.

Which Go versions are fixed?

The fixed versions are Go 1.26.11 and Go 1.27.4.

Is this vulnerability actively exploited in the wild?

There is no documentation or CISA KEV record indicating active exploitation of this vulnerability.

Original advisory description
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 in "-L" directories-were passed to the external linker without validating their format or checking for embedded linker options. Across platforms, this allowed executing GNU ld implicit linker scripts disguised as libraries or ".syso" files (or loaded via "-l:<filename>" or "-l" containing path separators), injecting unallowlisted linker flags via PE/COFF ".drectve" sections on Windows or Mach-O "LC_LINKER_OPTION" load commands on Darwin, or invoking LTO plugins via GCC or LLVM LTO intermediate representation sections in ELF, PE/COFF, or Mach-O objects. The go command now verifies that ".syso" files, direct linker inputs, and libraries in "-L" directories are valid binary objects or archives that do not contain unallowlisted ".drectve" directives, "LC_LINKER_OPTION" load commands, or LTO IR sections, and disallows "-l:<filename>" and ":", "=", or path separators in "-l" flags.

References

Source records: GO-2026-6853 (OSV.dev) · EPSS by FIRST, 2026-11-27.