{"id":"CVE-2026-97041","aliases":["GO-2026-6850"],"title":"Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link","titleSource":"Go","descriptionSource":"OSV","description":"Building a malicious package containing \"//go:cgo_*\" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms.\n\nThe compiler and linker did not reject commas in \"//go:cgo_import_dynamic\", \"//go:cgo_export_dynamic\", \"//go:cgo_export_static\", \"//go:cgo_import_static\", and \"//go:cgo_dynamic_linker\" directives, and the linker passed the dynamic linker path using \"-Wl,--dynamic-linker,<path>\". Furthermore, the two-argument form of \"//go:cgo_import_dynamic\" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading \"@\" could split \"-Wl,--export-dynamic-symbol=\" or \"-Wl,--dynamic-linker,\" into arbitrary host linker flags or response file arguments.\n\nThe compiler and linker now reject commas in \"//go:cgo_*\" symbol and dynamic linker directives, the linker passes \"-Wl,--dynamic-linker=<path>\", and \"cgo_import_dynamic\" no longer overwrites symbols exported via \"cgo_export_dynamic\" or \"cgo_export_static\".","severity":"unknown","score":null,"published":"2026-11-11T02:51:11.000Z","modified":"2026-11-11T03:15:14.803Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Go","name":"toolchain","sources":[{"name":"OSV · GO-2026-6850","url":"https://osv.dev/vulnerability/GO-2026-6850"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"1.26.11"},{"introduced":"1.27.0-0"},{"fixed":"1.27.4"}],"type":"SEMVER"}],"versions":[],"fixed":["1.26.11","1.27.4"]}],"sourceAffected":[],"references":["https://go.dev/cl/862154","https://go.dev/issue/82569","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6850"],"sources":[{"name":"CVE","id":"CVE-2026-97041","modified":"2026-11-11T03:13:15.269Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-97041"},{"name":"OSV","id":"GO-2026-6850","modified":"2026-11-11T03:15:14.803931428Z","url":"https://osv.dev/vulnerability/GO-2026-6850"}],"assessments":[],"cve":{"records":[{"id":"CVE-2026-97041","source":"Go","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-09-23T23:05:04.987Z","published":"2026-11-11T03:13:15.269Z","modified":"2026-11-11T03:13:15.269Z"}],"publishers":[{"name":"Go","role":"CNA","organizationId":"1bb62c36-49e3-4200-9d77-64a1400537cc","modified":"2026-11-11T03:13:15.269Z"}],"references":[{"url":"https://go.dev/cl/862154","tags":[],"source":"Go"},{"url":"https://go.dev/issue/82569","tags":[],"source":"Go"},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":[],"source":"Go"},{"url":"https://pkg.go.dev/vuln/GO-2026-6850","tags":[],"source":"Go"}],"weaknesses":[],"applicability":[],"prioritization":[]},"products":[{"vendor":"Go toolchain","name":"cmd/compile","platforms":[],"versions":[{"version":"0","status":"affected","lessThan":"1.26.11","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.4","versionType":"semver"}],"defaultStatus":"unaffected","cpes":[],"source":"Go","url":"https://www.cve.org/CVERecord?id=CVE-2026-97041"},{"vendor":"Go toolchain","name":"cmd/link","platforms":[],"versions":[{"version":"0","status":"affected","lessThan":"1.26.11","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.4","versionType":"semver"}],"defaultStatus":"unaffected","cpes":[],"source":"Go","url":"https://www.cve.org/CVERecord?id=CVE-2026-97041"}],"remediation":[],"observedAt":"2026-11-11T06:55:55.320Z","kev":{"status":"not-listed","checkedAt":"2026-11-14T23:35:33.875Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-11T07:30:37.531Z","attemptedAt":"2026-11-11T07:30:37.531Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-11T07:30:36.694Z","attemptedAt":"2026-11-11T07:30:36.694Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-11T07:30:37.530Z","attemptedAt":"2026-11-11T07:30:37.530Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-11T07:30:36.706Z","attemptedAt":"2026-11-11T07:30:36.706Z"}],"evidence":[{"source":"GitHub Advisory Database","id":"GHSA-537w-q924-jhpm","url":"https://github.com/advisories/GHSA-537w-q924-jhpm","modified":"2026-11-11T06:32:39Z","checkedAt":"2026-11-11T07:30:36.694Z"},{"source":"ENISA EUVD","id":"EUVD-2026-123104","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123104","modified":"Nov 11, 2026, 6:32:38 AM","checkedAt":"2026-11-11T07:30:37.530Z"},{"source":"NVD","id":"CVE-2026-97041","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97041","modified":"2026-11-11T05:19:58.417","checkedAt":"2026-11-11T07:30:37.531Z"}],"aiSummary":null}