CVE-2022-30580: Empty Cmd.Path can trigger unintended binary in os/exec on Windows
Vulnerability summary
CVE-2022-30580 is a high (CVSS 7.8) Improper Control of Generation of Code vulnerability in go standard library os/exec. EPSS estimates a 0.70% chance of exploitation in the next 30 days, higher than 53.2% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 5 · Related 5Timeline
- 09-08-2022PublishedVulnerability first disclosed.
- 06-03-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.70%
Chance of exploitation in the next 30 days
Percentile
53%
Versus all other CVEs
30-day change
Increase +0.07 pp
From 0.63% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- go≥ 1.18.0, < 1.18.4-r0
Go1 product
- stdlib≥ 1.18.0-0, < 1.18.3
Go standard library1 product
- os/exec< 1.17.11 | ≥ 1.18.0-0, < 1.18.3
Golang1 product
- go< 1.17.11 | ≥ 1.18.0, < 1.18.3
4 vendors · 4 products
References
7 links- go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345eFIXMailing ListPatchVendor Advisory
- pkg.go.dev/vuln/GO-2022-0532Vendor Advisory