Skip to main content
EPSS 0.5%top 60%

CVE-2025-61732: CWE-94: Improper Control of Generation of Code ('Code Injection') in Go toolchain cmd/cgo

0
High
VulnerabilityCVE-2025-61732cvecve-2025-61732cwe-94
Published: 02/05/2026 (02/05/2026, 03:42:26 UTC)
Source: CVE Database V5
Vendor/Project: Go toolchain
Product: cmd/cgo

Description

A discrepancy between how Go and C/C++ comments were parsed allowed for code smuggling into the resulting cgo binary.

CVSS v3.1

Score 8.6high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

Go toolchain

cmd/cgo

Affected versions
>=0 <1.24.13>=1.25.0-0 <1.25.7
github.com/golang/go/cmd/cgo
pkg:golang/github.com/golang/go/cmd/cgo
Affected versions
<1.25.0
cmd/cgo
pkg:golang/cmd/cgo
Affected versions
>=0 <1.24.13>=1.25.0-0 <1.25.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/15/2026, 14:39:52 UTC

Technical Analysis

This vulnerability arises from a parsing discrepancy between Go and C/C++ comments in the cmd/cgo tool, enabling code injection via comment-based code smuggling into the resulting cgo binary. An attacker could exploit this to embed and execute arbitrary code during the build process of Go modules that use cgo. The issue primarily affects systems compiling untrusted Go code with cgo, potentially leading to significant system compromise. Red Hat has issued an important security advisory and released patches in golang 1.25.7 to address this vulnerability.

Potential Impact

Successful exploitation allows an attacker to inject and execute arbitrary code within the compiled cgo binary, leading to high confidentiality, integrity, and availability impacts. This could result in significant system compromise on affected systems where untrusted Go modules using cgo are built. The CVSS v3.1 base score is 8.6 (high severity) with network attack vector, low attack complexity, no privileges required, user interaction required, and scope changed. Red Hat rates the impact as Important for their products.

Mitigation Recommendations

A security update fixing this vulnerability is available in golang version 1.25.7 and later. Users of affected Red Hat Enterprise Linux and OpenShift Container Platform versions should apply the provided patches promptly. Refer to the Red Hat advisory RHSA-2026:3192 for detailed update instructions. No alternative mitigations are specified by the vendor; applying the official fix is the recommended action.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2025-09-30T15:05:03.606Z
State
PUBLISHED
Vendor Advisory Urls
[{"url":"https://access.redhat.com/security/cve/CVE-2025-61732","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3192","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2706","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2708","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3468","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3470","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3489","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3471","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3473","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3472","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3469","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3193","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2709","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:7385","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:7291","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:12282","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:14100","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:21691","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:15091","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:14774","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:10104","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:5907","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:8448","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:5133","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:4434","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3855","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2844","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3559","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:3556","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:5948","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:5950","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:5952","vendor":"Red Hat"}]

Threat ID: 6984194cf9fa50a62fffe422

Added to database: 02/05/2026, 04:15:08 UTC

Last enriched: 08/15/2026, 14:39:52 UTC

Last updated: 09/10/2026, 22:12:33 UTC

Views: 374

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses