GO-2022-0476

See a problem?
Source
https://pkg.go.dev/vuln/GO-2022-0476
Import Source
https://vuln.go.dev/ID/GO-2022-0476.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0476
Aliases
Published
2022-07-28T17:24:43Z
Modified
2024-05-20T16:03:47Z
Summary
Arbitrary code execution via the go command with cgo in cmd/go
Details

The go command may execute arbitrary code at build time when cgo is in use. This may occur when running go get on a malicious package, or any other command that builds untrusted code.

This can be caused by malicious gcc flags specified via a cgo directive.

References
Credits
    • Imre Rad

Affected packages

Go / toolchain

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.14.12
Introduced
1.15.0-0
Fixed
1.15.5

Ecosystem specific

{
    "imports": [
        {
            "path": "cmd/go",
            "symbols": [
                "validCompilerFlags"
            ]
        }
    ]
}