GO-2022-0177

See a problem?
Source
https://pkg.go.dev/vuln/GO-2022-0177
Import Source
https://vuln.go.dev/ID/GO-2022-0177.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0177
Aliases
Published
2022-08-09T17:31:35Z
Modified
2024-05-20T16:03:47Z
Summary
Remote command execution via "go get" in cmd/go
Details

The "go get" command allows remote command execution.

Using custom domains, it is possible to arrange things so that example.com/pkg1 points to a Subversion repository but example.com/pkg1/pkg2 points to a Git repository. If the Subversion repository includes a Git checkout in its pkg2 directory and some other work is done to ensure the proper ordering of operations, "go get" can be tricked into reusing this Git checkout for the fetch of code from pkg2. If the Subversion repository's Git checkout has malicious commands in .git/hooks/, they will execute on the system running "go get".

References
Credits
    • Simon Rawet

Affected packages

Go / toolchain

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.4
Introduced
1.9.0-0
Fixed
1.9.1

Ecosystem specific

{
    "imports": [
        {
            "path": "cmd/go"
        }
    ]
}