CVE-2022-30580
Empty Cmd.Path can trigger unintended binary in os/exec on Windows
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
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.
Una inyección de código en el archivo Cmd.Start en os/exec versiones anteriores a Go 1.17.11 y Go 1.18.3, permite una ejecución de cualquier binario en el directorio de trabajo llamado "..com" o "..exe" llamando a Cmd.Run, Cmd.Start, Cmd.Output o Cmd.CombinedOutput cuando Cmd.Path no está establecido
An update that solves four vulnerabilities and has one errata is now available. This update for go1.17 fixes the following issues. Fixed crypto/rand rand.Read hangs with extremely large buffers. Fixed crypto/tls session tickets lack random ticket_age_add. Fixed path/filepath Clean returns 'c:' on Windows. Fixed os/exec empty Cmd.Path can result in running unintended binary on Windows.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-05-11 CVE Reserved
- 2022-06-07 CVE Published
- 2024-08-03 CVE Updated
- 2025-06-08 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-94: Improper Control of Generation of Code ('Code Injection')
CAPEC
References (5)
URL | Tag | Source |
---|---|---|
https://go.dev/issue/52574 | Issue Tracking | |
https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ | Mailing List |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e | 2023-11-07 |
URL | Date | SRC |
---|---|---|
https://go.dev/cl/403759 | 2023-11-07 | |
https://pkg.go.dev/vuln/GO-2022-0532 | 2023-11-07 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Golang Search vendor "Golang" | Go Search vendor "Golang" for product "Go" | < 1.17.11 Search vendor "Golang" for product "Go" and version " < 1.17.11" | - |
Affected
| ||||||
Golang Search vendor "Golang" | Go Search vendor "Golang" for product "Go" | >= 1.18.0 < 1.18.3 Search vendor "Golang" for product "Go" and version " >= 1.18.0 < 1.18.3" | - |
Affected
|