Vulnerability
CVE-2026-97037
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".
357 advisories report this vulnerability, across 14 ecosystems.
Advisories in Wolfi
- CGA-252w-p7x8-q688
- CGA-3h23-g7r5-hvhq
- CGA-444w-63mj-4f3r
- CGA-44x2-vrg8-253m
- CGA-4857-pw9v-mh3c
- CGA-4q3m-6rrc-7fw3
- CGA-5484-qwc6-jhm9
- CGA-5hfj-gh7q-9g7w
- CGA-5q47-x938-gm24
- CGA-64cj-p7f7-3mh6
- CGA-6g35-2fpp-rcjp
- CGA-6qhw-xph3-j3g7
- CGA-7fjv-2mfh-3q4v
- CGA-7rgp-82q5-jwr4
- CGA-8fvh-2fxr-2q6p
- CGA-988g-35q3-grc4
- CGA-98pp-7cfh-5qpm
- CGA-9948-2852-gvx7
- CGA-9978-vcmr-6wpj
- CGA-9cr5-7c52-x9q7
- CGA-c37j-3qpj-v4pv
- CGA-f57x-rxpq-m9vw
- CGA-f79p-8w4r-2fp7
- CGA-gq24-6rqx-f4x8
- CGA-hc3v-w79f-27xf
- CGA-hmqf-q4wr-g4rq
- CGA-hmw5-3j2r-x57f
- CGA-hq3m-h5w5-5p85
- CGA-hvcj-mhj3-qxhv
- CGA-hw22-mjr6-54p4
- CGA-j9rg-98fx-rrfm
- CGA-jr37-7mpx-fvxg
- CGA-jvm4-9r58-wvf3
- CGA-mrqm-phv4-ph4c
- CGA-p273-2246-f3cf
- CGA-r7f9-v536-vg82
- CGA-rmhw-x7m2-4846
- CGA-v964-45qx-whhr
- CGA-x8cx-vf7g-8vqq
- CGA-xrr2-hf4q-588c