{"id":"GO-2026-6855","revision":"c65029f71b6c4c4fb067c2572a768f76","records":[{"revision":"c65029f71b6c4c4fb067c2572a768f76","observedAt":"2026-11-11T04:27:36.086+00:00","statement":{"source":"osv","id":"GO-2026-6855","aliases":["CVE-2026-97036"],"title":"Arbitrary code execution during build on darwin via \"-l to_library\" in cgo in cmd/go","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.\n\nThe Apple linker recombines the separated arguments \"-l\" and \"to_library\" into \"-lto_library\", which loads an arbitrary LTO plugin dynamic library at link time.\n\nThe 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.","state":0,"publishedAt":"2026-11-11T02:51:11+00:00","modifiedAt":"2026-11-11T03:15:15.6771144+00:00","affected":[{"ecosystem":"Go","name":"toolchain","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.26.11"},{"kind":"introduced","version":"1.27.0-0"},{"kind":"fixed","version":"1.27.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://go.dev/cl/862149","https://go.dev/issue/82574","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6855","license":"OSV · upstream source license applies","key":"osv:GO-2026-6855","identifiers":["GO-2026-6855","CVE-2026-97036"]},"retained":false,"historicalAffected":[]}],"coverage":[]}