{"id":"GHSA-26gx-chjm-8pq7","revision":null,"records":[{"revision":"a3367c4a046c4f36ad7ef4c53058f6ec","observedAt":"2026-11-17T05:25:58.616+00:00","statement":{"source":"cve-program","id":"CVE-2026-97043","aliases":[],"title":"Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile","description":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives. When \"cmd/cgo\" generates \"_cgo_gotypes.go\", it quotes each \"#cgo LDFLAGS\" argument with strconv.Quote in a \"//go:cgo_ldflag\" directive, but \"cmd/compile\" and \"cmd/go\" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. \"cmd/compile\" and \"cmd/go\" now properly handle backslash-escaped quotes and unquote \"//go:cgo_*\" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.","state":0,"publishedAt":"2026-11-11T03:13:14.827+00:00","modifiedAt":"2026-11-17T04:55:23.195+00:00","affected":[{"ecosystem":"https://pkg.go.dev","name":"cmd/go","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Go toolchain\",\n                    \"product\": \"cmd/go\",\n                    \"collectionURL\": \"https://pkg.go.dev\",\n                    \"packageName\": \"cmd/go\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"1.26.11\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"1.27.0-0\",\n                            \"lessThan\": \"1.27.4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"},{"ecosystem":"https://pkg.go.dev","name":"cmd/compile","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Go toolchain\",\n                    \"product\": \"cmd/compile\",\n                    \"collectionURL\": \"https://pkg.go.dev\",\n                    \"packageName\": \"cmd/compile\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"1.26.11\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"1.27.0-0\",\n                            \"lessThan\": \"1.27.4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[],"references":["https://go.dev/cl/862156","https://go.dev/issue/82567","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6848"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-97043","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-97043","identifiers":["CVE-2026-97043"]},"retained":false,"historicalAffected":[]},{"revision":"b860b1665f314a33b325f21e40186899","observedAt":"2026-11-17T06:29:58.428+00:00","statement":{"source":"euvd","id":"EUVD-2026-123102","aliases":["CVE-2026-97043","GHSA-26gx-chjm-8pq7"],"title":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives. When \"cmd/cgo\" gener…","description":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives. When \"cmd/cgo\" generates \"_cgo_gotypes.go\", it quotes each \"#cgo LDFLAGS\" argument with strconv.Quote in a \"//go:cgo_ldflag\" directive, but \"cmd/compile\" and \"cmd/go\" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. \"cmd/compile\" and \"cmd/go\" now properly handle backslash-escaped quotes and unquote \"//go:cgo_*\" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD 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,"severity":null}],"references":["https://go.dev/cl/862156","https://go.dev/issue/82567","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6848"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123102","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Nov 11, 2026, 3:13:14 AM","dateUpdated":"Nov 17, 2026, 4:55:23 AM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-4370","title":"Golang Go: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff","vulnerabilityIds":["CVE-2026-97033","CVE-2026-97034","CVE-2026-97035","CVE-2026-97036","CVE-2026-97037","CVE-2026-97038","CVE-2026-97039","CVE-2026-97040","CVE-2026-97041","CVE-2026-97042","CVE-2026-97043","CVE-2026-97054"]},{"id":"openSUSE-SU-2026:12529-1","title":"go1.26-1.26.11-1.1 on GA media","vulnerabilityIds":["CVE-2026-97033","CVE-2026-97034","CVE-2026-97035","CVE-2026-97036","CVE-2026-97037","CVE-2026-97038","CVE-2026-97039","CVE-2026-97040","CVE-2026-97041","CVE-2026-97042","CVE-2026-97043","CVE-2026-97054"]},{"id":"openSUSE-SU-2026:12540-1","title":"go1.27-1.27.4-1.1 on GA media","vulnerabilityIds":["CVE-2026-97033","CVE-2026-97034","CVE-2026-97035","CVE-2026-97036","CVE-2026-97037","CVE-2026-97038","CVE-2026-97039","CVE-2026-97040","CVE-2026-97041","CVE-2026-97042","CVE-2026-97043","CVE-2026-97054"]},{"id":"msrc_CVE-2026-97043","title":"Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile","vulnerabilityIds":["CVE-2026-97043"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-123102","identifiers":["EUVD-2026-123102","CVE-2026-97043","GHSA-26gx-chjm-8pq7"]},"retained":false,"historicalAffected":[]},{"revision":"a3eae0dfc0fd42959e7e104c208e9878","observedAt":"2026-11-17T08:28:59.138+00:00","statement":{"source":"nvd","id":"CVE-2026-97043","aliases":[],"title":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives. When \"cmd/cgo\" gener…","description":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives. When \"cmd/cgo\" generates \"_cgo_gotypes.go\", it quotes each \"#cgo LDFLAGS\" argument with strconv.Quote in a \"//go:cgo_ldflag\" directive, but \"cmd/compile\" and \"cmd/go\" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice. \"cmd/compile\" and \"cmd/go\" now properly handle backslash-escaped quotes and unquote \"//go:cgo_*\" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.","state":0,"publishedAt":"2026-11-11T05:19:58.75+00:00","modifiedAt":"2026-11-17T05:18:39.207+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"severity":"HIGH"}],"references":["https://go.dev/cl/862156","https://go.dev/issue/82567","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6848"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-97043","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-88"],"productCriteria":[],"sourceDates":{"published":"2026-11-11T05:19:58.750","lastModified":"2026-11-17T05:18:39.207"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-97043","identifiers":["CVE-2026-97043"]},"retained":false,"historicalAffected":[]},{"revision":"b856cbf23ee641b894cfa0e7c0267eea","observedAt":"2026-11-11T04:27:36.086+00:00","statement":{"source":"osv","id":"GO-2026-6848","aliases":["CVE-2026-97043"],"title":"Unexpected code execution via escaped quotes in //go:cgo_ldflag in cmd/go and cmd/compile","description":"Building a malicious package that uses cgo could bypass \"#cgo LDFLAGS\" validation and cause unexpected code execution at build time, or cause the go command to panic, via crafted quoting in \"//go:cgo_ldflag\" directives.\n\nWhen \"cmd/cgo\" generates \"_cgo_gotypes.go\", it quotes each \"#cgo LDFLAGS\" argument with strconv.Quote in a \"//go:cgo_ldflag\" directive, but \"cmd/compile\" and \"cmd/go\" parsed those directives by splitting on raw quote characters without handling backslash escapes or unquoting the string. This mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end of the slice.\n\n\"cmd/compile\" and \"cmd/go\" now properly handle backslash-escaped quotes and unquote \"//go:cgo_*\" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been fixed.","state":0,"publishedAt":"2026-11-11T02:51:11+00:00","modifiedAt":"2026-11-11T03:15:14.7703629+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/862156","https://go.dev/issue/82567","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6848","license":"OSV · upstream source license applies","key":"osv:GO-2026-6848","identifiers":["GO-2026-6848","CVE-2026-97043"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-17T08:28:57.0883584+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-17T08:28:57.0883584+00:00","lastSuccessAt":"2026-11-17T08:28:57.2880138+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:57.2880145+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-30c3da459c38698a15d626d89e52e03e55e19fc45dae0e6d8d723cbf35472cf4-03b6d1b0a4437182d434eea7b7fb59c7db4f056f2fc27e5a23c00c2b008d3229","complete":true,"records":426275,"lastAttemptAt":"2026-11-17T08:26:02.9205656+00:00","lastSuccessAt":"2026-11-17T08:26:02.8997516+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:26:02.9205656+00:00","snapshotPublishedAt":"2026-11-17T07:26:23+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ca4331bede184d87be8572643f3ef682","complete":false,"records":13836,"lastAttemptAt":"2026-11-17T08:30:55.4515874+00:00","lastSuccessAt":"2026-11-17T08:30:55.5216742+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:30:55.5216742+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-17T08:28:57.0883584+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-17T08:28:57.0883584+00:00","lastSuccessAt":"2026-11-17T08:28:57.2887302+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:57.2887303+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-9755ca7d611f43d2904e88af6c9103a7","complete":true,"records":13849,"lastAttemptAt":"2026-11-17T08:28:59.4394795+00:00","lastSuccessAt":"2026-11-17T08:28:59.434+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:59.434+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13886,"expectedIdentifiers":13886,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-66941ff4149395c0d1a7082fb2226c4cd21c13f3179212d5083b3970d0d2aa5f","complete":true,"records":9958,"lastAttemptAt":"2026-11-17T08:28:56.865539+00:00","lastSuccessAt":"2026-11-17T07:28:38.090533+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:56.865539+00:00","snapshotPublishedAt":"2026-11-17T07:18:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-17T08:26:03.0260414+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:26:03.0260414+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-17T08:28:57.0138665+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:57.0138665+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-77c4624a706e18f1c3e85a3271102a8f9fcd5f1cde77af5eb680694c6290ab41","complete":true,"records":232593,"lastAttemptAt":"2026-11-17T08:28:56.1388775+00:00","lastSuccessAt":"2026-11-17T08:28:54.9120935+00:00","error":null,"lastVerifiedAt":"2026-11-17T08:28:56.1388775+00:00","snapshotPublishedAt":"2026-11-17T07:33:44+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}