CVE-2022-30580 Empty Cmd.Path can trigger unintended binary in os/exec on Windows
HighCVSS 7.8
EPSS 0.70%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
Description
Code injection in Cmd.Start in os/exec before Go 1.17.11 and Go 1.18.3 allows execution of any binaries in the working directory named either "..com" or "..exe" by calling Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput when Cmd.Path is unset.
Upgrade path
4 packages: 4 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| alpine/go(Alpine v3.16) | >= 1.18.0, < 1.18.4-r0 | 1.18.4-r0 | Fixed |
| golang go | < 1.17.11; >= 1.18.0, < 1.18.3 | 1.17.11, 1.18.3 | Fixed |
| os/exec(Go) | < 1.17.11; >= 1.18.0-0, < 1.18.3 | 1.17.11, 1.18.3 | Fixed |
| stdlib(Go) | < 1.17.11; >= 1.18.0-0, < 1.18.3 | 1.17.11, 1.18.3 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| stdlib(Go) | < 1.17.11 | 1.17.11 |
| stdlib(Go) | >= 1.18.0-0, < 1.18.3 | 1.18.3 |
| os/exec(Go) | < 1.17.11 | 1.17.11 |
| os/exec(Go) | >= 1.18.0-0, < 1.18.3 | 1.18.3 |
| golang go | < 1.17.11 | 1.17.11 |
| golang go | >= 1.18.0, < 1.18.3 | 1.18.3 |
| alpine/go(Alpine:v3.16) | >= 1.18.0, < 1.18.4-r0 | 1.18.4-r0 |
References
- go.dev patch vendor-advisory
- go.googlesource.com mailing-list patch vendor-advisory
- go.dev issue-tracking third-party-advisory
- groups.google.com mailing-list third-party-advisory
- pkg.go.dev vendor-advisory
- security.alpinelinux.org vendor-advisory