{"id":"CVE-2026-97036","aliases":["DEBIAN-CVE-2026-97036","EUVD-2026-123109","GHSA-qxq7-88pj-2ph7","GO-2026-6855","openSUSE-SU-2026:12529-1"],"status":"published","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 \u003cpath\u003e\" 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":{"day":"2026-11-12","score":0.00252,"percentile":0.16818,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-11-11T00:00:00Z","modified":"2026-11-12T17:23:23Z","fixes":[{"ecosystem":"Go","package":"toolchain","fixed_in":["1.26.11","1.27.4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"golang-1.19","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.19.10-1","1.19.10-2","1.19.11-1","1.19.12-1","1.19.12-2","1.19.12-2~bpo11+1","1.19.12-2~bpo12+1","1.19.13-1","1.19.13-1~bpo11+1","1.19.13-1~bpo12+1","1.19.8-2","1.19.9-1"]},{"source":"osv","ecosystem":"Debian:13","package":"golang-1.24","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.24.12-1","1.24.13-1","1.24.13-2","1.24.4-1","1.24.4-2","1.24.4-3","1.24.4-4","1.24.7-1","1.24.8-1","1.24.9-1"]},{"source":"osv","ecosystem":"Debian:14","package":"golang-1.26","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.26.0-1","1.26.1-1","1.26.10-1","1.26.10-1~bpo13+1","1.26.11-1","1.26.2-1","1.26.2-2","1.26.2-3","1.26.3-1","1.26.3-1~bpo13+1","1.26.3-2","1.26.3-2~bpo13+1","1.26.4-1","1.26.4-1~bpo13+1","1.26.5-1","1.26.5-1~bpo13+1","1.26.6-1","1.26.6-2","1.26.7-1","1.26.7-1~bpo13+1","1.26.8-1","1.26.8-1~bpo13+1","1.26.8-2","1.26.9-1","1.26.9-1~bpo13+1","1.26~rc2-1","1.26~rc3-1","1.26~rc3-2"]},{"source":"osv","ecosystem":"Debian:14","package":"golang-1.27","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.27.0-1","1.27.0-1~bpo13+1","1.27.1-1","1.27.1-2","1.27.1-2~bpo13+1","1.27.2-1","1.27.2-1~bpo13+1","1.27.2-1~bpo13+2","1.27.3-1","1.27.3-1~bpo13+1","1.27.4-1","1.27~rc1-1","1.27~rc2-1","1.27~rc3-1"]},{"source":"osv","ecosystem":"Go","package":"toolchain","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.26.11"},{"introduced":"1.27.0-0"},{"fixed":"1.27.4"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"go1.26","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.26.11-1.1"}]}],"bundled":12}],"products":[{"vendor":"go toolchain","product":"cmd/go"}],"references":[{"url":"https://go.dev/cl/862149","tags":["fix"]},{"url":"https://go.dev/issue/82574","tags":["report"]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":["web"]},{"url":"https://pkg.go.dev/vuln/GO-2026-6855"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97036"},{"url":"https://github.com/advisories/GHSA-qxq7-88pj-2ph7"},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-97036","tags":["advisory"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97033","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97034","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97035","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97036","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97037","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97038","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97039","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97040","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97041","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97042","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97043","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-97054","tags":["web"]}],"sources":{"cve":[{"id":"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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T03:13:16.347Z","modified":"2026-11-11T03:13:16.347Z","updated_at":"2026-11-11T04:22:54.647883Z"}],"euvd":[{"id":"EUVD-2026-123109","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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T03:13:16Z","modified":"2026-11-11T03:13:16Z","updated_at":"2026-11-11T08:27:52.334831Z"}],"ghsa":[{"id":"GHSA-qxq7-88pj-2ph7","title":"On Darwin, building a malicious package that uses cgo could cause arbitrary code execution when...","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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T06:32:38Z","modified":"2026-11-11T06:32:47Z","updated_at":"2026-11-11T07:02:43.25695Z"}],"nvd":[{"id":"CVE-2026-97036","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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T05:19:57.713Z","modified":"2026-11-11T05:19:57.713Z","updated_at":"2026-11-11T07:23:51.781546Z"}],"osv":[{"id":"DEBIAN-CVE-2026-97036","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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T05:19:57.713Z","modified":"2026-11-11T07:47:34.807145372Z","updated_at":"2026-11-11T08:27:16.400656Z"},{"id":"GO-2026-6855","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 \u003cpath\u003e\" 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.","status":"published","published":"2026-11-11T02:51:11Z","modified":"2026-11-11T03:15:15.677114364Z","updated_at":"2026-11-11T03:52:51.074362Z"},{"id":"openSUSE-SU-2026:12529-1","title":"go1.26-1.26.11-1.1 on GA media","description":"These are all security issues fixed in the go1.26-1.26.11-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-11-11T00:00:00Z","modified":"2026-11-12T17:23:23.015967912Z","updated_at":"2026-11-12T18:02:05.26944Z"}]}}
