CVE-2025-61731 | Arbitrary file write using cgo pkg-config directive in cmd/go

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.

Published: 2026-01-28 Last update: 2026-02-06 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2025-61731 is rated Low Risk (31.6/100): CVSS High severity, with low exploitation likelihood (EPSS 0.01%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-61731

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-01-29 0.01%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-61731

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 134c704f-9b21-4f2e-91b3-4a467353bcc0

Weakness enumeration for CVE-2025-61731

OS Trackers for CVE-2025-61731

vendor priority summary link
alpine CVE-2025-61731: 1 source package rows (go); 90 state rows across 2 repos (3.23-community, edge-community); fixed 2, open 88. https://security.alpinelinux.org/vuln/CVE-2025-61731
debian not yet assigned CVE-2025-61731 not yet assigned priority: Debian including 4 source packages (golang-1.15, golang-1.19, golang-1.24, golang-1.25), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): open 3, resolved 2. https://security-tracker.debian.org/tracker/CVE-2025-61731
redhat high https://access.redhat.com/security/cve/CVE-2025-61731
suse high CVE-2025-61731 severity important: SUSE including 91 source package names (13.2-9.1:curl-8.6.0-5.1, 13.2-9.1:iputils-20221126-6.1, …), 509 product×package rows across 65 product lines (Container suse/sl-micro/6.0/baremetal-os-container, Container suse/sl-micro/6.0/base-os-container, … (65 product lines)): Fixed 439, Known Not Affected 56, First Fixed 14. https://www.suse.com/security/cve/CVE-2025-61731/
ubuntu medium CVE-2025-61731 medium priority: Ubuntu including 16 source packages (golang, golang-1.10, …), 82 status rows across 8 suites (bionic, focal, jammy, noble, questing, trusty, upstream, xenial): needs-triage 49, DNE 33. https://ubuntu.com/security/CVE-2025-61731

Affected software / configurations for CVE-2025-61731

Vendor Product Version Raw CPE
golang go < 1.24.12 cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
golang go >= 1.25.0, < 1.25.6 cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*

References for CVE-2025-61731

cvelogic Threat Intelligence