Vulnerability
CVE-2026-97034
When using GCC, building a malicious package that uses cgo could cause arbitrary command execution at link time via untrusted GCC spec files ("specs" or "*.spec"). When linking with "-fopenmp", "-fopenacc", or "-fsanitize=" in "#cgo LDFLAGS", GCC's built-in link spec evaluates "%:include(libgomp.spec)" or "%:include(libsanitizer.spec)" and searches for spec files in "-L" and sysroot directories (including subdirectories and multilib sibling directories such as "../lib64"), as well as the working directory when "-fopenmp" or "-fopenacc" is used or when "-fsanitize=" is combined with "-static" or "-static-lib*". The go command now rejects "-L", "-isysroot", and "-Wl,-syslibroot" directories (and the working and package directories when applicable) that contain GCC spec files, and disallows "@" and "-" prefixes in "-fsanitize=" compiler flag values.
357 advisories report this vulnerability, across 14 ecosystems.
Advisories in Wolfi
- CGA-23pf-39mr-vqcr
- CGA-2gg7-c3hw-jxjm
- CGA-2h7m-953m-j77h
- CGA-2mg4-x7gv-4xmv
- CGA-3jfm-26x3-r47v
- CGA-4873-f3m7-q6px
- CGA-4jc7-7fr4-4ww9
- CGA-5gj6-98m6-wg98
- CGA-6v29-pg7q-hp42
- CGA-6v77-vqm5-6f56
- CGA-7335-3fr2-7rj2
- CGA-7mrm-v68p-f46v
- CGA-7v8w-9h6f-vv62
- CGA-8xxj-92r2-x9j4
- CGA-9fx5-m4p3-3fj8
- CGA-9h2w-xq9c-6gqp
- CGA-9rj8-jmcj-mrjg
- CGA-ch27-6gcg-x9g6
- CGA-ffv2-9266-v3cg
- CGA-fh23-m5j8-4hj8
- CGA-gh8r-6r39-jrwx
- CGA-hxfj-4rrw-57m9
- CGA-j796-m8ff-xpmh
- CGA-jjwm-jc2c-j98q
- CGA-mhg6-vxvc-hw8f
- CGA-mm6p-56cv-5c67
- CGA-mp95-5qjm-rg8r
- CGA-mpf3-fr5r-j9qm
- CGA-pgp4-8wxv-7qjf
- CGA-pmpg-q952-c8wv
- CGA-pxj7-xm2h-xcrw
- CGA-q8x9-364h-j922
- CGA-qh79-vw76-jcj3
- CGA-qhq8-hr59-mrw2
- CGA-r4h3-5g2c-6mqv
- CGA-vj3g-p4wc-235w
- CGA-w6r5-j4vg-mv7x
- CGA-x8r5-2hgc-9gr4
- CGA-x9mm-m262-fhcq
- CGA-xqjf-f4fr-3rf2