Skip to content

cmd/go: potential code smuggling using doc comments (CVE-2025-61732) #76697

@thatnealpatel

Description

@thatnealpatel

In very select cases, it is possible to smuggle C code, that is otherwise ignored by the Go compiler, into generated files due to semantic differences in how the Go compiler and the C compiler parse comment strings.

Since this issue does not otherwise expand the capabilities of generating Go and C files using Cgo, we are treating this as a PUBLIC track issue per the Go Security Policy.

Thank you to RyotaK (https://ryotak.net) of GMO Flatt Security Inc. for reporting this issue.

This is CVE-2025-61732.

cc @golang/compiler

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.Security

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions