{"id":"CVE-2026-97037","aliases":["CVE-2026-97037","GO-2026-6854","BIT-GOLANG-2026-97037"],"related":["RHSA-2026:101231","RHSA-2026:102586","RHSA-2026:102587","RHSA-2026:102592","RHSA-2026:99003","RHSA-2026:99004"],"kind":"vulnerability","state":"published","title":"Linker script injection via split -Wl, flags and Darwin or symbol linker flags in cgo in cmd/go","summary":"Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via \"#cgo LDFLAGS\". Split \"-Wl,\" flags that consume a following argument (such as \"-Wl,-rpath\", \"-Wl,--just-symbols\", and \"-Wl,-undefined\") previously accepted a bare second argument without a \"-Wl,\" prefix, which the compiler driver passes directly to the linker as a positional input file. Additionally, when using GNU ld.bfd, flags such as \"-framework\", \"-Wl,-framework\", \"-Wl,-undefined\", \"-Wl,--just-symbols\", \"-Wl,-R\", \"-Wl,-subsystem\", and (on non-Darwin platforms) \"-Wl,-sectcreate\" could cause ld.bfd to interpret their arguments as linker scripts if they named a regular file on disk. The go command now requires a \"-Wl,\" prefix on the second token of split \"-Wl,\" flags (except \"-Wl,-R\"), verifies that these flags do not reference linker script files, and disallows bare \"-Wl,--warn-backrefs-exclude\".","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Building a malicious package that uses cgo could cause arbitrary code execution at link time by passing linker script files to the host linker via \"#cgo LDFLAGS\". Split \"-Wl,\" flags that consume a following argument (such as \"-Wl,-rpath\", \"-Wl,--just-symbols\", and \"-Wl,-undefined\") previously accepted a bare second argument without a \"-Wl,\" prefix, which the compiler driver passes directly to the linker as a positional input file. Additionally, when using GNU ld.bfd, flags such as \"-framework\", \"-Wl,-framework\", \"-Wl,-undefined\", \"-Wl,--just-symbols\", \"-Wl,-R\", \"-Wl,-subsystem\", and (on non-Darwin platforms) \"-Wl,-sectcreate\" could cause ld.bfd to interpret their arguments as linker scripts if they named a regular file on disk. The go command now requires a \"-Wl,\" prefix on the second token of split \"-Wl,\" flags (except \"-Wl,-R\"), verifies that these flags do not reference linker script files, and disallows bare \"-Wl,--warn-backrefs-exclude\".","source":"cvelist"}],"published":"2026-11-11T02:51:11.000Z","modified":"2026-11-27T06:56:08.449Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.26.11","status":"affected"},{"type":"semver","introduced":"1.27.0-0","fixed":"1.27.4","status":"affected"}],"vendor":"Go toolchain","product":"cmd/go","package":"cmd/go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.26.11"},{"type":"semver","introduced":"1.27.0-0","status":"affected","fixed":"1.27.4"}],"ecosystem":"Go","package":"toolchain","purl":"pkg:golang/toolchain","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.26.11"},{"type":"semver","introduced":"1.27.0-0","status":"affected","fixed":"1.27.4"}],"ecosystem":"Bitnami","package":"golang","purl":"pkg:bitnami/golang","source":"bitnami"}],"references":[{"url":"https://go.dev/cl/862150","tags":["fix","web"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://go.dev/issue/82573","tags":["report","web"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":["web"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://pkg.go.dev/vuln/GO-2026-6854","tags":["web"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97037","tags":["web"],"sources":["bitnami"]}],"credits":[],"assigner":"Go","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-16T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-97037","url":"https://www.cve.org/CVERecord?id=CVE-2026-97037","licence":"CVE Terms of Use","modified":"2026-11-17T04:55:25.636Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6854","url":"https://pkg.go.dev/vuln/GO-2026-6854","licence":"CC-BY-4.0","modified":"2026-11-27T06:56:08.449Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-97037","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97037","licence":"Public domain","modified":"2026-11-17T05:18:38.873Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GOLANG-2026-97037","url":"https://osv.dev/vulnerability/BIT-GOLANG-2026-97037","licence":"Apache-2.0","modified":"2026-11-27T06:56:08.449Z"}],"updatedAt":"2026-11-27T07:27:26.274Z","epss":{"score":0.00686,"percentile":0.53911,"date":"2026-12-01T12:00:22.000Z"}}