CVE-2022-30580
HIGH7.8EPSS 0.07%Empty Cmd.Path can trigger unintended binary in os/exec on Windows
Published: 7/26/2022Modified: 5/20/2025
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.
Affected packages (2)
- Bitnami/golangfrom 0, < 1.17.11, >= 1.18.0, < 1.18.3
- Go/stdlibfrom 0, < 1.17.11, >= 1.18.0-0, < 1.18.3
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | HIGH7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
References (6)
- PATCHhttps://go.dev/cl/403759
- PATCHhttps://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e
- REPORThttps://go.dev/issue/52574
- WEBhttps://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2022-30580
- WEBhttps://pkg.go.dev/vuln/GO-2022-0532