Vulnerability
CVE-2026-97039
Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc" files or inject unvalidated compiler and linker flags. The pkg-config flag allowlist previously permitted "--with-path=" and "--personality=", allowed "--define-variable=" values beginning with "=" or "$" (which can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or "-L$SYSROOT" linker search paths), and allowed package arguments ending in ".pc" or containing path separators or "..", which caused pkg-config to load local ".pc" files directly from the package directory. In addition, flags returned by "pkg-config --cflags" in cgoCPPFLAGS were not checked when determining whether internal linking is safe. The go command now disallows "--with-path=", "--personality=", leading "=" or "$" characters in "--define-variable=" values, and local ".pc" paths in "#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when checking internal linking compatibility.
357 advisories report this vulnerability, across 14 ecosystems.
Advisories in Chainguard
- CGA-22vh-hqgw-rjf3
- CGA-22xj-jrm7-qpcq
- CGA-2533-ccf4-68pc
- CGA-28hf-4hg2-fw32
- CGA-2c8x-34fc-3xh5
- CGA-2jvv-623g-3qmp
- CGA-2jw7-535p-mr47
- CGA-2pj2-rch6-rqp8
- CGA-2qg5-28m9-9443
- CGA-2vrg-2w7w-6325
- CGA-2w74-2f8g-jv2f
- CGA-2w87-3p98-2m83
- CGA-2wp3-jm4j-c585
- CGA-2x3h-rp3c-vjx9
- CGA-389f-wx9r-9xr7
- CGA-38r3-m25w-xxx5
- CGA-3cm9-chg7-p279
- CGA-3cp2-7rrx-5g8w
- CGA-3f72-45wh-96pg
- CGA-3g7j-7fj4-gw25
- CGA-3p6g-45hj-xvmv
- CGA-3pjr-52qg-f4r2
- CGA-3r7q-v293-jj89
- CGA-3w8j-g99q-g62c
- CGA-3xgq-qvp7-32xr
- CGA-3xmh-cvp9-q39g
- CGA-3xmj-hg7w-2j7q
- CGA-422r-63p8-2gx8
- CGA-42cv-5w8m-qpfj
- CGA-432p-hgwf-52qp
- CGA-454w-9h6v-9prw
- CGA-46qq-jrrg-5jx6
- CGA-478p-7xq9-8fg8
- CGA-49vf-7549-hjg9
- CGA-4gfx-2xvj-75f7
- CGA-4gxh-77w6-x3q3
- CGA-4jmf-mrp3-xfw9
- CGA-4mff-7x3x-f335
- CGA-4pqj-xp88-2h9f
- CGA-4qq8-q772-99q2
- CGA-4qqf-3wj2-5688
- CGA-4vgr-h35x-537c
- CGA-4x29-4rc7-fxvw
- CGA-4xq9-37ph-gj7f
- CGA-523r-q67p-f8jg
- CGA-5543-2jwq-hgvw
- CGA-57f4-568m-hq6r
- CGA-58mf-h6j8-fggm
- CGA-5g43-hcm8-x3pj
- CGA-5h3g-hx66-f99h
- CGA-5jpg-4x5v-34rw
- CGA-5mfx-8935-9mjp
- CGA-5pvj-pjwg-j3v6
- CGA-5r29-xvf4-x742
- CGA-5rpq-c82c-6r3h
- CGA-5v62-574r-jg7m
- CGA-5vwx-6r45-cmj5
- CGA-5w87-gv68-7j9w
- CGA-638g-2f39-83pc
- CGA-6494-rp8g-2rr6
- CGA-668h-x579-frrh
- CGA-685r-fmjq-57g3
- CGA-692j-rh55-r527
- CGA-6c9h-gph6-g7rp
- CGA-6cvm-j335-jhmh
- CGA-6f77-8f42-hx89
- CGA-6f8p-pf76-8cff
- CGA-6gxj-2jqw-7rcm
- CGA-6h64-jg2x-6j3x
- CGA-6hm9-gw54-mmvc
- CGA-6p4w-g3ph-8m23
- CGA-6pq5-486j-jx77
- CGA-6q8j-gw4q-9hww
- CGA-6qh9-3w2m-fcrf
- CGA-6xf9-77gj-mpr5
- CGA-7262-v683-2px8
- CGA-72f3-qrx6-vc38
- CGA-73qm-p962-q3r2
- CGA-75xm-v7v3-j84m
- CGA-779q-536j-jp62
- CGA-7846-wm98-6jcc
- CGA-7ff7-q4h9-m5g5
- CGA-7gmw-pwg7-fm7q
- CGA-7j27-687g-697h
- CGA-7m9m-m9pr-qrq8
- CGA-7pfg-252w-x4f7
- CGA-7v28-6r98-793h
- CGA-7v9x-p2wm-39x7
- CGA-7vmm-qwv4-4q88
- CGA-7w33-664q-7mwj
- CGA-7xmx-6h25-p528
- CGA-83fc-hg56-xc99
- CGA-844c-hcfw-882r
- CGA-84fv-p735-r8vm
- CGA-8633-6c48-67gp
- CGA-8cpc-6c75-qxfm
- CGA-8fq2-74vm-w9jv
- CGA-8fxh-2qfm-q679
- CGA-8g5f-5w4x-j7gw
- CGA-8gjj-8rqm-rp3v
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-97039.