# CVE-2026-97043: Unexpected code execution via escaped quotes in //go:cgo\_ldflag in cmd/go and cmd/compile

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-11 · Modified: 2026-11-17
- Aliases: DEBIAN-CVE-2026-97043, GO-2026-6848, UBUNTU-CVE-2026-97043, ALPINE-CVE-2026-97043, CGA-2qgr-426v-r683, CGA-38qw-39q8-5grq, CGA-392q-6mm5-mpjw, CGA-3w68-f9f8-23xr, CGA-47rx-mv2x-68cw, CGA-65jf-gchr-4p9h, CGA-6gc2-h3h3-h9m8, CGA-6x2r-5835-3mc4, CGA-6xhp-9pv4-4cmf, CGA-8c32-3xxc-w3f5, CGA-9594-mhxf-6f48, CGA-9vrc-6p6g-3jq6, CGA-cm24-p8f2-jf8v, CGA-cr59-qwcv-rj64, CGA-f72c-97q5-29vh, CGA-g4v5-hwjv-p974, CGA-g77c-63r9-2hjp, CGA-g8m5-6927-cwrj, CGA-ghp3-2ggx-mq2j, CGA-jfrr-v2hq-p6f8, CGA-mfj9-7796-8qv2, CGA-mh6w-2w3c-cj48, CGA-mh8c-9w3c-5mmq, CGA-pqfg-wj7x-fjww, CGA-pvqr-8p47-x94c, CGA-pw4p-jghf-853q, CGA-qg25-57qm-jjpv, CGA-qmqp-wvfq-h424, CGA-qpf6-5vr2-w8p8, CGA-r3vj-6rq2-7gf3, CGA-r57c-rv73-mvwh, CGA-rfrx-2chf-xxh2, CGA-rhfq-c5hx-fccq, CGA-rpq3-v26v-8v72, CGA-vcjp-f5jm-2c35, CGA-vqvw-rf72-x459, CGA-vxpp-cwr6-726c, CGA-w95x-8jw4-f5h9, CGA-xchx-v5gf-4g87, CGA-xvm2-fw8x-vmm6, CGA-239v-55j7-5vmx, CGA-248w-r7rx-hfgf, CGA-24wj-w5wr-c7mx, CGA-25cj-gx88-v6xr, CGA-2654-3p6h-hpgq, CGA-27xf-3pr9-mm54, CGA-2cp9-m9j2-4f9v, CGA-2g4h-q3h9-f2qm, CGA-2gjv-4vf2-jm5q, CGA-2gp5-g39j-4mp7, CGA-2ph7-fvq8-p9mx, CGA-2pvh-fm5v-h493, CGA-2qhv-74gh-5mcm, CGA-2qhw-pj59-r983, CGA-2qm8-r6wg-h49x, CGA-2rvq-mxp4-px8c, CGA-2w95-2gh7-9f7g, CGA-2x32-jh3v-fcw9, CGA-2x82-q899-r4c9, CGA-2xmj-vqpj-7wp3, CGA-3228-r3fv-hfx3, CGA-3333-9mm4-qcm8, CGA-34v3-5222-5cgv, CGA-35v7-x9rm-39w6, CGA-36r7-g3wh-372v, CGA-38qp-v9p4-gj9v, CGA-39qv-5v73-9g2m, CGA-3c4q-mr3r-x3vp, CGA-3gfc-72gm-vq8w, CGA-3h7j-vvvf-j9g7, CGA-3jv8-4r4q-hh9m, CGA-3mc4-873c-r7f9, CGA-3q4w-m725-w5q5, CGA-425w-qvxh-qq2c, CGA-44jq-wqxx-fjch, CGA-4934-r8qj-2fp8, CGA-4cg4-qcc8-g2r5, CGA-4fq9-h4gx-jg9p, CGA-4j9f-726g-5cqw, CGA-4pgj-67m8-vjj9, CGA-4q7q-h9ww-cc3p, CGA-4q9x-chph-hfcq, CGA-4r2q-xqpp-92hf, CGA-4r53-r4cr-7qmf, CGA-4r77-wcr4-55vw, CGA-4vh3-2h3f-mcgw, CGA-4vvq-gqf6-mjf7, CGA-52gx-c43j-9f7c, CGA-53mx-428c-xwqm, CGA-5cwm-rxhg-j233, CGA-5jvg-j4cr-j7rm, CGA-5wm8-fcrm-m3qv, CGA-5xmc-w42p-c4rc, CGA-62mv-582r-75fc, CGA-649j-rjvg-c3x8, CGA-6552-36f5-9r82, CGA-668q-9828-xrm8, CGA-668x-2h6g-v794, CGA-68rq-36m7-vrj7, CGA-6fcp-4r35-6q7m, CGA-6g6m-7xpp-v2p4, CGA-6h25-fjx4-pg83, CGA-6mcf-h6f8-8cjj, CGA-6r5x-6m26-cw93, CGA-6v5j-54qx-w62x, CGA-6vrg-89x7-m7w5, CGA-6xg6-49pw-97ww, CGA-73qq-mcm3-5657, CGA-7637-993c-2gwh, CGA-77jx-c747-rg6m, CGA-79g8-4wff-2wjc, CGA-79g8-qcr3-37vr, CGA-79jw-jphq-cpfh, CGA-7g3g-4pvf-5v6h, CGA-7gp7-wr32-m67f, CGA-7h5v-g2pq-qmhg, CGA-7jv2-5wmm-mvw4, CGA-7m3m-w2m2-p6hr, CGA-7pc7-8v74-r8v3, CGA-7pqh-x7cf-9p2w, CGA-7r3p-4762-rv46, CGA-7r62-53h8-f56p, CGA-7vmf-qw48-24xq, CGA-7wqj-78p4-p2xh, CGA-7wxw-49qr-phv7, CGA-7x84-3h94-r3rj, CGA-854g-hggm-8gwg, CGA-85p3-vmp5-jp67, CGA-8c3x-prch-2wjr, CGA-8cf8-9m8c-w77g, CGA-8cvh-9575-4ph4, CGA-8gvc-34v9-255h, CGA-8h79-9x35-8wrw, CGA-8hx3-6frw-x838, CGA-8p42-22f3-fwq6, CGA-8pc8-9j2c-q7mx, CGA-8q88-34w5-jqf6, CGA-8qrw-wf86-982m, CGA-8vmr-33cp-h7g5, CGA-8xwg-j75c-7fmw, CGA-925f-79fg-4xm2, CGA-9372-g8mg-qf2m, CGA-97qr-x9rh-g328, CGA-98ff-r737-f6g6, CGA-99gj-w8p3-42wh, CGA-9c9x-m5r5-jqq2, CGA-9j5g-3j4x-cmw7, CGA-9jf3-4wrq-fw6j, CGA-9p3c-qj35-p345, CGA-9vj7-82pr-h26h, CGA-c5m7-9v84-m43m, CGA-c75g-ffjw-7h5r, CGA-c84w-4p7f-f7r7, CGA-c8h8-qxxx-6frr, CGA-cm6h-88mm-74h5, CGA-cvxv-r642-xvp6, CGA-f4gg-4p73-4jvg, CGA-fcw8-5jq9-hcj3, CGA-ff27-gcc3-qg47, CGA-ffff-2qv2-q7xv, CGA-ffj5-xrqv-p828, CGA-fg5f-c668-hg86, CGA-fmgf-h689-4342, CGA-frpj-8f7j-xrq8, CGA-fxhq-rvxr-g4c5, CGA-g3p8-5c4f-g98x, CGA-g4px-cmr5-7cxf, CGA-g5hx-r57x-6v9p, CGA-g654-h7m5-jm4c, CGA-g836-g2rf-vgw9, CGA-g8hf-j422-x9c5, CGA-gg82-vhgf-3vjv, CGA-ggjj-4ph3-4mcv, CGA-ggrh-jm6m-jx4f, CGA-ghw4-v35j-pfj5, CGA-gjjf-7vgg-6pw6, CGA-gpf2-3h6g-rh6p, CGA-gpx6-3326-22jc, CGA-gqpv-mxwf-86cv, CGA-gr66-hmpg-985h, CGA-grpm-cwxr-f5mp, CGA-gvwg-j7fg-xhjm, CGA-gw74-362p-96w5, CGA-gx9p-x94h-3fq8, CGA-h38f-cmf6-45v3, CGA-h56v-g94j-j5qw, CGA-h629-6jhv-8559, CGA-h6r6-8wr7-4j5r, CGA-h7p8-7hhj-p683, CGA-h92m-3w63-5g9f, CGA-hcqf-jvg5-4rwj, CGA-hfr3-g9cv-ww25, CGA-hgpg-rm8h-x7g8, CGA-hjp7-84m6-xpwf, CGA-hjpm-cgxg-v5r2, CGA-hm9h-4q2c-4jcm, CGA-hpxh-6gv2-q63c, CGA-hqj9-g37h-v792, CGA-hrxg-2m8m-g694, CGA-hvxw-hrwr-5rj4, CGA-j22h-29jc-jjpv, CGA-j2fw-vw77-ggcr, CGA-j2hc-mcwc-6vm6, CGA-j323-j6wx-rvfv, CGA-j529-83gh-726f, CGA-j582-wrfg-xj6q, CGA-j5m6-q3p3-7jwm, CGA-j7g8-9m25-7x2g, CGA-j82w-9rjp-qcfx, CGA-j9r8-8v69-mpcx, CGA-jc53-g646-7v8j, CGA-jcmr-mp47-xf46, CGA-jf7v-x9w5-78gj, CGA-jg2p-m4ch-gxm8, CGA-jjmc-g5jr-w72w, CGA-jm5c-p9f2-hcfg, CGA-jr83-hmj9-fw83, CGA-jrcm-vx8f-ccxp, CGA-jx2r-68jf-cfq4, CGA-m2vq-c5wr-xwjg, CGA-m42p-72jm-f457, CGA-m6fc-mpm3-xpr7, CGA-m6mm-32w8-phm8, CGA-m7jp-22wq-4cg2, CGA-mjcx-j6vr-78x8, CGA-mqg6-hq2m-m7g8, CGA-mrr9-mfrp-gj67, CGA-mv9m-fvwj-93wf, CGA-mxfq-xq2x-xqfg, CGA-p2p6-7m35-2x4c, CGA-p7x3-pc58-g729, CGA-pc82-vmqx-m7wp, CGA-pgf5-gfwg-cw6w, CGA-pgjm-rrm2-2r7c, CGA-pmx7-q4h5-9mpm, CGA-pp55-qw7q-x3q7, CGA-pq72-mj44-vx6g, CGA-pwfg-g484-4m9g, CGA-px98-w958-rwq4, CGA-pxm9-x755-5mxh, CGA-pxw2-6j8r-wq4r, CGA-q227-4q75-6x7w, CGA-q68m-96ch-h9g8, CGA-q8v4-7p8f-f4gq, CGA-qcqc-wr67-9cmq, CGA-qg62-qxw3-xvvc, CGA-qh3h-mhf6-82qh, CGA-qp4x-vjmc-x4f4, CGA-qpc4-8mxx-vxxr, CGA-qwcq-f9mj-mwgf, CGA-qwgj-vwgr-wj93, CGA-r3g2-gc2x-qghf, CGA-r4v6-wj3m-5v22, CGA-r54x-82v5-ghqc, CGA-r5jf-9xmh-cmhm, CGA-r6f9-2jvx-cxp4, CGA-r8rp-4g8j-w7gg, CGA-r98g-c9r2-v429, CGA-r9gh-xrh5-8q6j, CGA-rc55-c79v-r35j, CGA-rg48-28wg-wm4g, CGA-rg4q-mq5q-qx4m, CGA-rjg8-vwq9-v578, CGA-rq6m-rh9x-8c5w, CGA-rr9w-c9rv-x2cv, CGA-rrpf-mxhh-w3r7, CGA-rv7h-qcrf-3ww5, CGA-rw56-3cjr-8pwf, CGA-rxrc-22m2-g86c, CGA-v4vx-hv3j-57pc, CGA-v8jw-pvqr-c5gv, CGA-v983-jh9q-68cj, CGA-vgp9-w28r-w852, CGA-vhf5-xxr9-j9hr, CGA-vj8h-5r68-rp44, CGA-vjfc-3p3g-p8m9, CGA-vp73-76ff-gv3w, CGA-vpf9-9qcc-5h8m, CGA-vpx3-9gh8-j35m, CGA-vqq9-wwf2-q3v6, CGA-vr73-m547-pfxq, CGA-vvq4-99rw-h6cq, CGA-vw46-594q-xqp4, CGA-vw9m-qpr6-r859, CGA-w296-f7cx-f379, CGA-w56j-vc86-vx89, CGA-w6cr-rq3j-gfrv, CGA-w8cj-m48v-46pm, CGA-w8f8-c8gj-3x78, CGA-w946-jj4q-cprx, CGA-w9rj-x5hf-364j, CGA-w9wh-jmq5-8chp, CGA-wfw5-7256-95ww, CGA-wgm8-2r7x-c87g, CGA-whq7-g48c-g57j, CGA-wjcv-x4p5-3fvw, CGA-wmvx-7fq9-q5rq, CGA-wr42-2h6m-92c3, CGA-wrqc-5g7m-g43v, CGA-wrvm-38q5-433h, CGA-wv4h-2v74-xx8h, CGA-ww8p-vxwj-h373, CGA-wxf4-2vqm-r3rx, CGA-x376-rx22-w9h4, CGA-x7hh-8cxr-2v8q, CGA-xm7c-m6v9-6m2q, CGA-xpmf-rpfr-gfcg, CGA-xvq6-wjjq-r666, CGA-27jf-cp6p-2m2r, CGA-27v2-3vm9-mcm6, CGA-cg2x-vj3x-2957, CGA-fjph-w24g-wgj3, CGA-326m-6r3j-hfvr, CGA-8m3g-8gqq-r42x, CGA-p8f5-v9jj-c83m, CGA-pppc-8c28-g9wh, BIT-golang-2026-97043, CGA-2833-2f4x-h2c4, CGA-2pcj-cxf6-78mh, CGA-48g5-jr97-g4w5, CGA-62q2-prjj-f822, CGA-99f8-2fvc-jh9c, CGA-cxx5-592r-gj47, CGA-f5q4-j93w-q5mx, CGA-mx52-9293-xmqx, CGA-qmg3-22wc-2jgw, CGA-wh9x-28x3-5v7x, CGA-328m-9556-3fch, CGA-q88j-p8pg-m87w, CGA-vg93-j4hv-rhvm, CGA-xcjm-w5h7-8j98
- Record: https://cvemate.com/vulnerability/CVE-2026-97043 · JSON: https://cvemate.com/vulnerability/CVE-2026-97043/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.72%, percentile 55.284%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 106)

- alpine go (Alpine Linux): \< 1.26.11-r0 \| \< 1.27.4-r0
- chainguard azure-service-operator (Chainguard): All versions (No fix recorded)
- chainguard commercial-chainloop-backend (Chainguard): All versions (No fix recorded)
- chainguard commercial-chainloop-cli (Chainguard): All versions (No fix recorded)
- chainguard commercial-expanso-edge (Chainguard): All versions (No fix recorded)
- chainguard commercial-gitlab-rails-ee-19.1 (Chainguard): All versions (No fix recorded)
- chainguard commercial-gitlab-rails-ee-19.2 (Chainguard): All versions (No fix recorded) \| \< 19.2.11-r0
- chainguard commercial-gitlab-rails-ee-fips-19.1 (Chainguard): All versions (No fix recorded) \| \< 19.1.10-r5
- chainguard commercial-gitlab-rails-ee-fips-19.2 (Chainguard): All versions (No fix recorded) \| \< 19.2.11-r0
- chainguard commercial-gitlab-workhorse-ee-19.1 (Chainguard): All versions (No fix recorded) \| \< 19.1.11-r0
- chainguard commercial-gitlab-workhorse-ee-19.2 (Chainguard): All versions (No fix recorded) \| \< 19.2.10-r2
- chainguard commercial-gitlab-workhorse-ee-fips-19.1 (Chainguard): All versions (No fix recorded) \| \< 19.1.11-r0
- chainguard commercial-gitlab-workhorse-ee-fips-19.2 (Chainguard): All versions (No fix recorded) \| \< 19.2.10-r2
- chainguard commercial-grafana-11.6 (Chainguard): All versions (No fix recorded)
- chainguard commercial-grafana-12.2 (Chainguard): All versions (No fix recorded)
- chainguard commercial-grafana-12.3 (Chainguard): All versions (No fix recorded)
- chainguard commercial-grafana-12.4 (Chainguard): All versions (No fix recorded) \| \< 12.4.16-r0
- chainguard commercial-grafana-13.0 (Chainguard): All versions (No fix recorded) \| \< 13.0.14-r0
- chainguard commercial-grafana-13.1 (Chainguard): All versions (No fix recorded) \| \< 13.1.11-r0
- chainguard commercial-grafana-13.2 (Chainguard): All versions (No fix recorded)

## References

- <https://security-tracker.debian.org/tracker/CVE-2026-97043>
- <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>
- <https://ubuntu.com/security/CVE-2026-97043>
- <https://www.cve.org/CVERecord?id=CVE-2026-97043>
- <https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM/m/KsU1KfWgAQAJ>
- <https://github.com/golang/go/issues/82567>
- <https://github.com/golang/go/commit/3eb71096ddd9c6fdac2a361be897708ec0d4c3fc>
- <https://github.com/golang/go/commit/e9bc401e7197f5c0b806b1cd8db52e34c2d26b97>
- <https://security.alpinelinux.org/vuln/CVE-2026-97043>

---

Data as of 2026-12-05T08:38:08.545Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
