Arbitrary code execution during build on darwin via "-l to_library" in cgo in cmd/go
CVE-2026-97036 · GHSA-qxq7-88pj-2ph7 · EUVD-2026-123109 · GO-2026-6855 · published 11 Nov 2026
How serious is it
- Severity: high, CVSS score 8.8 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-97036?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
toolchain(Go) < 1.26.11toolchain(Go) >= 1.27.0-0, < 1.27.4
How to check
- Run
go list -m toolchainin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- On < 1.26.11: Upgrade
toolchainto 1.26.11 or later, commit the lockfile and redeploy. - On >= 1.27.0-0, < 1.27.4: Upgrade
toolchainto 1.27.4 or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l to_library <path>" in a "#cgo LDFLAGS" directive.
The Apple linker recombines the separated arguments "-l" and "to_library" into "-lto_library", which loads an arbitrary LTO plugin dynamic library at link time.
The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS", rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- go.dev/cl/862149
- go.dev/issue/82574
- groups.google.com/g/golang-announce/c/iY8TY0wWgbM
- pkg.go.dev/vuln/GO-2026-6855
Merged from ENISA EUVD, OSV. Last updated 17 Nov 2026. All vulnerabilities · RSS · JSON