Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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