Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2025-61731

Summary
Assigner-Go
Assigner Org ID-1bb62c36-49e3-4200-9d77-64a1400537cc
Published At-28 Jan, 2026 | 19:30
Updated At-29 Jan, 2026 | 16:17
Rejected At-
Credits

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.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:Go
Assigner Org ID:1bb62c36-49e3-4200-9d77-64a1400537cc
Published At:28 Jan, 2026 | 19:30
Updated At:29 Jan, 2026 | 16:17
Rejected At:
▼CVE Numbering Authority (CNA)
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.

Affected Products
Vendor
Go toolchain
Product
cmd/go
Collection URL
https://pkg.go.dev
Package Name
cmd/go
Default Status
unaffected
Versions
Affected
  • From 0 before 1.24.12 (semver)
  • From 1.25.0 before 1.25.6 (semver)
Problem Types
TypeCWE IDDescription
N/AN/ACWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Type: N/A
CWE ID: N/A
Description: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

RyotaK (https://ryotak.net) of GMO Flatt Security Inc.
Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://go.dev/cl/736711
N/A
https://go.dev/issue/77100
N/A
https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
N/A
https://pkg.go.dev/vuln/GO-2026-4339
N/A
Hyperlink: https://go.dev/cl/736711
Resource: N/A
Hyperlink: https://go.dev/issue/77100
Resource: N/A
Hyperlink: https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
Resource: N/A
Hyperlink: https://pkg.go.dev/vuln/GO-2026-4339
Resource: N/A
▼Authorized Data Publishers (ADP)
CISA ADP Vulnrichment
Affected Products
Metrics
VersionBase scoreBase severityVector
3.17.8HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Version: 3.1
Base score: 7.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:security@golang.org
Published At:28 Jan, 2026 | 20:16
Updated At:06 Feb, 2026 | 18:43

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.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Secondary3.17.8HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Type: Secondary
Version: 3.1
Base score: 7.8
Base severity: HIGH
Vector:
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CPE Matches

Go
golang
>>go>>Versions before 1.24.12(exclusive)
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Go
golang
>>go>>Versions from 1.25.0(inclusive) to 1.25.6(exclusive)
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Weaknesses
CWE IDTypeSource
NVD-CWE-noinfoPrimarynvd@nist.gov
CWE ID: NVD-CWE-noinfo
Type: Primary
Source: nvd@nist.gov
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://go.dev/cl/736711security@golang.org
Patch
https://go.dev/issue/77100security@golang.org
Issue Tracking
https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUcsecurity@golang.org
Release Notes
Mailing List
https://pkg.go.dev/vuln/GO-2026-4339security@golang.org
Vendor Advisory
Hyperlink: https://go.dev/cl/736711
Source: security@golang.org
Resource:
Patch
Hyperlink: https://go.dev/issue/77100
Source: security@golang.org
Resource:
Issue Tracking
Hyperlink: https://groups.google.com/g/golang-announce/c/Vd2tYVM8eUc
Source: security@golang.org
Resource:
Release Notes
Mailing List
Hyperlink: https://pkg.go.dev/vuln/GO-2026-4339
Source: security@golang.org
Resource:
Vendor Advisory

Change History

0
Information is not available yet

Similar CVEs

2Records found

CVE-2016-3958
Matching Score-8
Assigner-MITRE Corporation
ShareView Details
Matching Score-8
Assigner-MITRE Corporation
CVSS Score-7.8||HIGH
EPSS-0.15% / 36.17%
||
7 Day CHG~0.00%
Published-23 May, 2016 | 19:00
Updated-12 Apr, 2025 | 10:46
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available

Untrusted search path vulnerability in Go before 1.5.4 and 1.6.x before 1.6.1 on Windows allows local users to gain privileges via a Trojan horse DLL in the current working directory, related to use of the LoadLibrary function.

Action-Not Available
Vendor-n/aGo
Product-gon/a
CVE-2022-30580
Matching Score-8
Assigner-Go Project
ShareView Details
Matching Score-8
Assigner-Go Project
CVSS Score-7.8||HIGH
EPSS-0.03% / 6.95%
||
7 Day CHG~0.00%
Published-09 Aug, 2022 | 20:18
Updated-03 Aug, 2024 | 06:56
Rejected-Not Available
Known To Be Used In Ransomware Campaigns?-Not Available
KEV Added-Not Available
KEV Action Due Date-Not Available
Empty Cmd.Path can trigger unintended binary in os/exec on Windows

Code injection in Cmd.Start in os/exec before Go 1.17.11 and Go 1.18.3 allows execution of any binaries in the working directory named either "..com" or "..exe" by calling Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput when Cmd.Path is unset.

Action-Not Available
Vendor-Go standard libraryGo
Product-goos/exec
CWE ID-CWE-94
Improper Control of Generation of Code ('Code Injection')
Details not found