CVE Intelligence
Skip to main content
HIGH

CVE-2025-61731

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 Updated Sources: cvelistV5, Go

Triage

Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.

Exploitation

Unreported

no source claims exploitation

EPSS

1%

chance of exploitation in 30 days

Affects

go toolchain

32 products listed

CVSS base

7.8

HIGH

CISA SSVC assessment

Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.

CISA

Exploitation

None

none · proof-of-concept · active

Automatable

No

can an attacker script all four kill-chain steps

Technical impact

Total

partial · total control of the vulnerable component

Affected scope

The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.

Products (32)

cmd gored hat enterprise linux 10red hat enterprise linux 10 0 extended update supportred hat enterprise linux 8red hat enterprise linux 8 2 advanced update supportred hat enterprise linux 8 4 advanced mission critical update supportred hat enterprise linux 8 4 extended update support long life add onred hat enterprise linux 8 6 advanced mission critical update supportred hat enterprise linux 8 6 telecommunications update servicered hat enterprise linux 8 6 update services for sap solutionsred hat enterprise linux 8 8 telecommunications update servicered hat enterprise linux 8 8 update services for sap solutionsred hat enterprise linux 9red hat enterprise linux 9 0 update services for sap solutionsred hat enterprise linux 9 2 update services for sap solutionsred hat enterprise linux 9 4 extended update supportred hat enterprise linux 9 6 extended update supportred hat hardened imagesred hat openshift container platform 4 12red hat openshift container platform 4 13red hat openshift container platform 4 14red hat openshift container platform 4 15red hat openshift container platform 4 16red hat openshift container platform 4 17red hat openshift container platform 4 18red hat openshift container platform 4 19red hat openshift container platform 4 20red hat openshift service mesh 2 6red hat openshift service mesh 3 0red hat openshift service mesh 3 1red hat openshift service mesh 3 2red hat openshift virtualization 4

Every base score collected

Sources score independently and disagree; each row says who scored it and under which version.

ScoreVersionSeverityExpl.ImpactSource
7.8CVSS 3.1HIGH——cvelistV5

Weakness & attack patterns

  • CWE-88

Detection

Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.

  • Search application, proxy, and WAF logs for requests touching /go.

References

25 on the record

Elsewhere on this site

Not in any source we poll

Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.

  • No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
  • No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
  • No exploit packet captures, log samples, or incident case IDs supplied.