{"affected":[{"defaultStatus":"unaffected","ecosystem":"https://pkg.go.dev","packageName":"cmd/go","platforms":["darwin"],"product":"cmd/go","source":"CNA: Go","vendor":"Go toolchain","versions":[{"lessThan":"1.26.11","status":"affected","version":"0","versionType":"semver"},{"lessThan":"1.27.4","status":"affected","version":"1.27.0-0","versionType":"semver"}]}],"cveId":"CVE-2026-97036","cwes":["CWE-88"],"description":"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.","epss":null,"exploits":[],"kev":null,"metrics":[],"modifiedAt":1794366796347,"publishedAt":1794366796347,"references":[{"source":"CNA: Go","tags":[],"url":"https://go.dev/cl/862149"},{"source":"CNA: Go","tags":[],"url":"https://go.dev/issue/82574"},{"source":"CNA: Go","tags":[],"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"},{"source":"CNA: Go","tags":[],"url":"https://pkg.go.dev/vuln/GO-2026-6855"}],"remediation":[],"revision":"cef219d3ef682c5779d0dabf5218bcff46d809ee554232be2d62ebf8b935825e","sources":[{"modifiedAt":1794366796347,"name":"CNA: Go","retrievedAt":1794370194605,"url":"https://www.cve.org/CVERecord?id=CVE-2026-97036"}],"ssvc":null,"status":"published","title":"Arbitrary code execution during build on darwin via \"-l to_library\" in cgo in cmd/go","updatedAt":1794370194605}