Skip to content
Threat Brief

← All advisories

CVE-2026-97040

Critical 9.8No known exploitationFix available

Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link

Record last updated

CVSS score

9.8

Critical on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.6%

Higher than 51% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

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, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds. The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.

Weakness: CWE-94

Patching and mitigation

Patch status
Fix available (source: Microsoft MSRC)
Fix documented (source date)
Mitigation
None documented
Vendor guidance
msrc.microsoft.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Microsoftazl3 golang 1.26.10-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.26.11-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.27.3-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.27.4-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl4 golang 1.26.10-3.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Advisory change

    Microsoft advisory revised (2.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  3. Advisory change

    Microsoft advisory revised (3.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  4. Advisory change

    Microsoft advisory revised (4.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  5. Advisory change

    Microsoft advisory revised (5.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  6. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references