Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2025-61731

cmd/go: cmd/go: Arbitrary file write via malicious pkg-config directive

Overview

Published
28 Jan 2026
Modified
10 Sep 2026
High CVE
1 Registry packages
1,329 OS packages
17 Linux distributions
Yes Fix available

Description

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.

Source: OX vulnerability database

Severity

7.8 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weakness: CWE-88

Affected packages · 1

Packages affected by CVE-2025-61731
EcosystemPackageVulnerableFixed in
Bitnami golang <1.24.12>=1.25.0, <1.25.6 1.24.121.25.6

Open a package to see all its vulnerabilities.

Operating systems · 1,427 fixes

Oracle Linux 2 releases · 2 packages

fixed 3
delve go-toolset
Oracle Linux fixes for CVE-2025-61731
ReleasePackageFixed in
8 delve 1.25.2-1.0.1.module+el8.10.0+90715+2d4d8dfd
8 go-toolset +7 1.25.8-1.module+el8.10.0+90863+afbc39cb
9 go-toolset +7 1.25.8-1.el9_7

Photon OS 1 release · 1 package

fixed 1
go
Photon OS fixes for CVE-2025-61731
ReleasePackageFixed in
5.0 go 1.24.13-1.ph5

Red Hat 3 releases · 3 packages

affected 1 fixed 19
go-toolset golang delve
Red Hat fixes for CVE-2025-61731
ReleasePackageFixed inAdvisory
8 go-toolset +7 affected —
8 (go-toolset:rhel8) go-toolset 0:1.13.15-1.module+el8.2.0+7662+fa98b974 RHSA-2026:7878
8 (go-toolset:rhel8) golang +6 0:1.13.15-15.module+el8.2.0+24191+89968df7 RHSA-2026:7878
8 (go-toolset:rhel8) golang +6 0:1.15.14-21.module+el8.4.0+24185+53e66e3d RHSA-2026:7879
8 (go-toolset:rhel8) go-toolset 0:1.15.14-3.module+el8.4.0+22765+91da4d3f RHSA-2026:7879
8 (go-toolset:rhel8) golang +6 0:1.17.13-15.module+el8.6.0+24195+22baade4 RHSA-2026:7876

14 more rows

SUSE Linux Enterprise 5 releases · 4 packages

fixed 20
go1-24-openssl go1-24 go1-25 go1-25-openssl
SUSE Linux Enterprise fixes for CVE-2025-61731
ReleasePackageFixed inAdvisory
15.4 go1-24-openssl +2 1.24.12-150000.1.18.1 SUSE-SU-2026:0296-1
15.4 go1-24 +2 1.24.12-150000.1.53.1 SUSE-SU-2026:0219-1
15.4 go1-25 +2 1.25.6-150000.1.26.1 SUSE-SU-2026:0218-1
15.4 go1-25-openssl +2 1.25.6-150000.1.9.1 SUSE-SU-2026:0297-1
15.5 go1-24-openssl +2 1.24.12-150000.1.18.1 SUSE-SU-2026:0296-1
15.5 go1-24 +2 1.24.12-150000.1.53.1 SUSE-SU-2026:0219-1

14 more rows

alma 3 releases · 3 packages

fixed 4
golang-docs delve go-toolset
alma fixes for CVE-2025-61731
ReleasePackageFixed in
10 golang-docs +3 1.25.8-1.el10_1.alma.1
8 (go-toolset:rhel8) delve 1.25.2-1.module_el8.10.0+4074+24330916
8 (go-toolset:rhel8) go-toolset +7 1.25.8-1.module_el8.10.0+4156+92f0ae2f
9 go-toolset +7 1.25.8-1.el9_7

alpine 4 releases · 2 packages

fixed 7
go etcd
alpine fixes for CVE-2025-61731
ReleasePackageFixed in
3.22 go 1.24.12-r0
3.23 go 1.25.6-r0
3.23 etcd 3.6.8-r0
3.24 go 1.25.6-r0
3.24 etcd 3.6.8-r0
edge go 1.25.6-r0

1 more row

amazon linux 1 release · 2 packages

fixed 2
golang amazon-ssm-agent
amazon linux fixes for CVE-2025-61731
ReleasePackageFixed in
2023 golang +6 1.24.12-1.amzn2023.0.1
2023 amazon-ssm-agent 3.3.3883.0-1.amzn2023

chainguard 1 release · 781 packages

not affected 1 fixed 780
scanner-test-golang-vulnerability-unfixed scanner-test-golang-vulnerability-fixed qemu-guesthelper kube-vip-cloud-provider-0-0-10 kube-vip-cloud-provider stakater-reloader-0-0-128 +775
chainguard fixes for CVE-2025-61731
ReleasePackageFixed in
scanner-test-golang-vulnerability-unfixed not affected
scanner-test-golang-vulnerability-fixed 0.0.1-r1
qemu-guesthelper 0.0.1-r7
kube-vip-cloud-provider-0-0-10 0.0.10-r8
kube-vip-cloud-provider 0.0.12-r8
stakater-reloader-0-0-128 0.0.128-r28

775 more rows

debian 4 releases · 3 packages

affected 4
golang-1-15 golang-1-19 golang-1-24
debian fixes for CVE-2025-61731
ReleasePackageFixed in
11 golang-1-15 affected
12 golang-1-19 affected
13 golang-1-24 affected
14 golang-1-24 affected

echo 1 release · 2 packages

affected 1 fixed 1
golang-1-19 golang-1-24
echo fixes for CVE-2025-61731
ReleasePackageFixed in
golang-1-19 affected
golang-1-24 1.24.12

minimos 1 release · 271 packages

fixed 271
pombump tw cargobump grype falcoctl kserve-modelmesh-runtime-adapter-fips +265
minimos fixes for CVE-2025-61731
ReleasePackageFixed in
pombump 0.0.16-r4
tw 0.0.36-r0
cargobump 0.1.0-r5
grype 0.105.0-r0
falcoctl +1 0.12.0-r0
kserve-modelmesh-runtime-adapter-fips 0.12.0-r4

265 more rows

openSUSE 1 release · 2 packages

fixed 2
go1-24 go1-25
openSUSE fixes for CVE-2025-61731
ReleasePackageFixed inAdvisory
Tumbleweed go1-24 +3 1.24.12-1.1 openSUSE-SU-2026:10063-1
Tumbleweed go1-25 +3 1.25.6-1.1 openSUSE-SU-2026:10064-1

openSUSE Leap 1 release · 5 packages

fixed 5
coredns go1-24 go1-24-openssl go1-25 go1-25-openssl
openSUSE Leap fixes for CVE-2025-61731
ReleasePackageFixed inAdvisory
16.0 coredns +1 1.14.2-bp160.1.1 openSUSE-SU-2026:20619-1
16.0 go1-24 +3 1.24.12-160000.1.1 openSUSE-SU-2026:20077-1
16.0 go1-24-openssl +2 1.24.13-160000.1.1 openSUSE-SU-2026:20308-1
16.0 go1-25 +3 1.25.6-160000.1.1 openSUSE-SU-2026:20085-1
16.0 go1-25-openssl +2 1.25.7-160000.1.1 openSUSE-SU-2026:20301-1

rocky 3 releases · 2 packages

fixed 4
go-toolset delve
rocky fixes for CVE-2025-61731
ReleasePackageFixed in
10 go-toolset +7 1.25.8-1.el10_1
8 (go-toolset:rhel8) delve 1.25.2-1.module+el8.10.0+40035+ee0a7047
8 (go-toolset:rhel8) go-toolset +7 1.25.8-1.module+el8.10.0+40147+cdb46b6d
9 go-toolset +7 1.25.8-1.el9_7

root.io debian 2 releases · 2 packages

affected 1 fixed 1
rootio-golang-1-19 golang-1-24
root.io debian fixes for CVE-2025-61731
ReleasePackageFixed in
12 rootio-golang-1-19 affected
13 golang-1-24 +1 1.24.4-1.root.io.19

ubuntu 5 releases · 4 packages

affected 5
golang-1-10 golang-1-13 golang-1-21 golang-1-23
ubuntu fixes for CVE-2025-61731
ReleasePackageFixed in
18.04-ESM golang-1-10 +3 affected
20.04-ESM golang-1-13 +6 affected
22.04 golang-1-13 +7 affected
24.04 golang-1-21 +3 affected
26.04 golang-1-23 +1 affected

wolfi 1 release · 294 packages

fixed 294
kube-vip-cloud-provider local-path-provisioner sbom-scorecard sbom-convert gke-gcloud-auth-plugin cargobump +288
wolfi fixes for CVE-2025-61731
ReleasePackageFixed in
kube-vip-cloud-provider 0.0.12-r8
local-path-provisioner 0.0.34-r1
sbom-scorecard 0.0.7-r26
sbom-convert 0.0.7-r7
gke-gcloud-auth-plugin 0.1.0-r12
cargobump 0.1.1-r1

288 more rows

References

Show all 53 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.