Vulnerability
CVE-2025-61731
Building a malicious file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The "#cgo pkg-config:" directive in a Go source file provides command-line arguments to provide to the Go pkg-config command. An attacker can provide a "--log-file" argument to this directive, causing pkg-config to write to an attacker-controlled location.
3232 advisories report this vulnerability, across 15 ecosystems.
Advisories
-
ALAS2-2026-3136
Amazon Linux 2 2017.12 - ALAS2-2026-3136: important priority package update for golang
-
ALAS2-2026-3207
Amazon Linux 2 2017.12 - ALAS2-2026-3207: important priority package update for amazon-ssm-agent
-
ALAS2023-2026-1381
Amazon Linux 2023 - ALAS2023-2026-1381: Important priority package update for golang
-
ALAS2023-2026-1499
Amazon Linux 2023 - ALAS2023-2026-1499: Important priority package update for amazon-ssm-agent
-
ALPINE-CVE-2025-61731
Building a malicious file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The "#cgo pkg-config:" directive in a Go source file provides command-line…
- ALPINE-EDGE-CVE-2025-61731
-
ALSA-2026:5941
Important: golang security update
-
ALSA-2026:5942
Important: golang security update
-
ALSA-2026:6949
Important: go-toolset:rhel8 security update
-
AZL-78935
CVE-2025-61731 affecting package golang 1.25.7-1
-
AZL-98568
CVE-2025-61731 affecting package golang 1.27.1-1
- CGA-22cx-g49g-5vff
- CGA-22j9-rw26-wx5m
- CGA-22wf-gfjm-cg2q
- CGA-232v-c26c-xrvc
- CGA-2358-rgwj-c4rp
- CGA-237r-7x4q-m94v
- CGA-238v-6pxf-m2qx
- CGA-23fv-8q62-m69r
- CGA-23g4-689h-cg8j
- CGA-23j5-h9hv-qjmr
- CGA-23m6-hww6-xrxf
- CGA-23q8-3xpm-8m2v
- CGA-2428-36fp-g6vq
- CGA-2432-gprh-2552
- CGA-24v7-m852-vc27
- CGA-2577-m9j6-wm3j
- CGA-25f9-6j55-rwfp
- CGA-25hq-5mc9-j48g
- CGA-25mq-fp9p-fhfx
- CGA-262c-j4vm-c24f
- CGA-2648-ppxf-4jcw
- CGA-26h2-w3ph-c69v
- CGA-26hw-rgq8-xgcx
- CGA-26m4-8p2c-jhr5
- CGA-26vh-6m9g-5xfv
- CGA-26w2-rhhr-945g
- CGA-26xr-85rv-f629
- CGA-278v-7jxw-478w
- CGA-27fj-7mh2-5j62
- CGA-27h7-83fq-9m6j
- CGA-27j8-qf9q-58x3
- CGA-27jm-pjp2-74w5
- CGA-27p9-w6xp-2628
- CGA-27vw-w7p3-84r5
- CGA-27x2-mr3p-wp4f
- CGA-28hx-wjv5-6q7p
- CGA-28q5-cv3w-6gr8
- CGA-2953-vw88-6jp5
- CGA-297r-vc94-96wx
- CGA-29mh-xr3m-r83h
- CGA-29w7-5q38-9wxh
- CGA-2c36-5gwh-prx7
- CGA-2c78-vwh3-c79h
- CGA-2c84-8jw3-7f8j
- CGA-2cmv-m4hm-g698
- CGA-2f22-2jpv-mxrf
- CGA-2f3c-35rp-j778
- CGA-2f4v-wvrm-vvwr
- CGA-2f9f-c8x5-vhjh
- CGA-2fff-m448-3fqj
- CGA-2fq3-3845-5334
- CGA-2fwp-x565-hchq
- CGA-2g5g-mvcq-cmj4
- CGA-2g5v-qj74-vjc9
- CGA-2g98-r6w9-49m9
- CGA-2g9x-8w58-fgph
- CGA-2ggq-773m-9362
- CGA-2gv6-33pc-h9r6
- CGA-2gx4-jp6g-hwgq
- CGA-2h2v-hf3h-2fxf
- CGA-2h6r-5rcp-4c82
- CGA-2hc5-7c6r-fm7g
- CGA-2hg4-fvqf-jgqh
- CGA-2hg6-cq9c-vp6c
- CGA-2hm5-6h3m-gwhx
- CGA-2hqx-ffqp-9mqr
- CGA-2hrr-hhmf-76hp
- CGA-2j29-77cm-qq62
- CGA-2j4f-grv2-rrwh
- CGA-2j4m-xhff-vwrw
- CGA-2j96-qvxx-g8vm
- CGA-2j9p-wr38-8jwx
- CGA-2jjf-28vj-3792
- CGA-2jvh-h484-h2cr
- CGA-2m27-75x7-4w7x
- CGA-2m4c-xf8w-qw9w
- CGA-2m58-phgc-h9jm
- CGA-2m74-r8xr-94qf
- CGA-2mgj-vw68-xrwv
- CGA-2mhr-926j-cwf5
- CGA-2mrh-gv29-46mg
- CGA-2mxv-x93g-j79m
- CGA-2p8q-4mpf-49rw
- CGA-2pc3-5rvj-5qrf
- CGA-2pcq-2gcr-4qpc
- CGA-2pmf-2gcp-jh6j
- CGA-2pr9-73m3-mpmw
- CGA-2pxx-fvvf-wj7q
- CGA-2q3f-r5jh-r4rv
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2025-61731.
References
- https://go.dev/cl/736711
- https://go.dev/issue/77100
- https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
- https://pkg.go.dev/vuln/GO-2026-4339
- https://access.redhat.com/errata/RHSA-2026:12118
- https://access.redhat.com/errata/RHSA-2026:12282
- https://access.redhat.com/errata/RHSA-2026:13736
- https://access.redhat.com/errata/RHSA-2026:14100
- https://access.redhat.com/errata/RHSA-2026:14774
- https://access.redhat.com/errata/RHSA-2026:15091
- https://access.redhat.com/errata/RHSA-2026:17598
- https://access.redhat.com/errata/RHSA-2026:20088
- https://access.redhat.com/errata/RHSA-2026:21691
- https://access.redhat.com/errata/RHSA-2026:3556
- https://access.redhat.com/errata/RHSA-2026:3559
- https://access.redhat.com/errata/RHSA-2026:3855
- https://access.redhat.com/errata/RHSA-2026:4434
- https://access.redhat.com/errata/RHSA-2026:5941
- https://access.redhat.com/errata/RHSA-2026:5942
- https://access.redhat.com/errata/RHSA-2026:5943
- https://access.redhat.com/errata/RHSA-2026:5944
- https://access.redhat.com/errata/RHSA-2026:5948
- https://access.redhat.com/errata/RHSA-2026:5950
- https://access.redhat.com/errata/RHSA-2026:5952
- https://access.redhat.com/errata/RHSA-2026:6949
- https://access.redhat.com/errata/RHSA-2026:7291
- https://access.redhat.com/errata/RHSA-2026:7385
- https://access.redhat.com/errata/RHSA-2026:7833
- https://access.redhat.com/errata/RHSA-2026:7834
- https://access.redhat.com/errata/RHSA-2026:7876
- https://access.redhat.com/errata/RHSA-2026:7877
- https://access.redhat.com/errata/RHSA-2026:7878
- https://access.redhat.com/errata/RHSA-2026:7879
- https://access.redhat.com/errata/RHSA-2026:7883
- https://access.redhat.com/errata/RHSA-2026:8448
- https://access.redhat.com/security/cve/CVE-2025-61731
- https://bugzilla.redhat.com/show_bug.cgi?id=2434433
- https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-61731.json