CVE-2026-97038: Go - Linker Flag Injection
- Cve: CVE-2026-97038
- Name: Go - Linker Flag Injection
- 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.
- Impact: Attackers can inject arbitrary linker flags or execute arbitrary code at link time, potentially compromising the build process and resulting binaries.
- Remediation: Update to the latest Go version that includes the fix for linker input validation.
- Vulnerability type: command_injection
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: securitycontext
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.00686
- Epss percentile: 0.5359
- Assignee: [email protected]
- Published at: 2026-11-11T05:19:58Z
- Age in days: 13
- Modified at: 2026-11-17T05:18:39Z
- Patch available: yes
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-97038
- Nvd status: awaiting_analysis
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-94 | Improper Control of Generation of Code |
References
Same in every row:
- Source: nvd
- Tags:
| Url |
|---|
| https://go.dev/cl/862151 |
| https://go.dev/issue/82572 |
| https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM |
| https://pkg.go.dev/vuln/GO-2026-6853 |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| golang:go | >= 1.27.0-0, < 1.27.4; < 1.26.11 | no | cna_alias | /v1/products/golang/go |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| golang/go | fix | yes | /v1/repositories/golang/go |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Exposed hosts: 1852470
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports