CVE-2022-30580: Empty Cmd.Path can trigger unintended binary in os/exec on Windows

Published Aug 9, 2022
·
Updated

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.

Other sources

Empty Cmd.Path can trigger unintended binary in os/exec on Windows

Microsoft

Golang Go could allow a local attacker to execute arbitrary code on the system, caused by a flaw when Cmd.Run, cmd.Start, cmd.Output, or cmd.CombinedOutput are executed when Cmd.Path is unset. By sending a specially-crafted request, an attacker could exploit this vulnerability to execute arbitrary code on the system.

IBM

Affected Software

5 affected componentsFixes available
Golang Go<1.17.11
Golang Go>=1.18.0<1.18.3
IBM Concert Software<=1.0.0 - 1.0.1
Microsoft cm1 golang 1.18.5-1
Microsoft cbl2 golang 1.18.5-1

Event History

Aug 9, 2022
CVE Published
via MITRE·08:18 PM
Data Sourced
via MITRE·08:18 PM
DescriptionWeakness
Aug 10, 2022
Data Sourced
via NVD·08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Aug 16, 2022
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Oct 21, 2024
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID of this code injection vulnerability?

The vulnerability ID is CVE-2022-30580.

2

What is the severity of CVE-2022-30580?

The severity of CVE-2022-30580 is high with a CVSS score of 7.8.

3

Which software versions are affected by CVE-2022-30580?

Versions of Go before 1.17.11 and versions between 1.18.0 and 1.18.3 are affected by CVE-2022-30580.

4

How can an attacker exploit this vulnerability?

An attacker can exploit this vulnerability by calling Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput when Cmd.Path is unset, allowing execution of any binaries in the working directory named "..com" or "..exe".

5

Are there any fix or workaround available for CVE-2022-30580?

Yes, upgrading to Go 1.17.11 or Go 1.18.3 or later versions is recommended to fix CVE-2022-30580.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203