Skip to content

cmd/go: bypass of flag sanitization can lead to arbitrary code execution (CVE-2025-61731) #77100

@neild

Description

@neild

Usage of 'CgoPkgConfig' allowed execution of the pkg-config
binary with flags that are not explicitly safe-listed.

To prevent this behavior, compiler flags resulting from usage
of 'CgoPkgConfig' are sanitized prior to invoking pkg-config.

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

This is CVE-2025-61731 and https://go.dev/issue/77100.


This is a PRIVATE issue for CVE-2025-61731, tracked in http://b/463693513 and fixed by https://go-internal-review.git.corp.google.com/c/go/+/3240.

/cc @golang/security and @golang/release

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.Securityrelease-blockervulncheck or vulndbIssues for the x/vuln or x/vulndb repo

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions