Skip to main content
← All vulnerabilities
CVE-2022-30580GO-2022-0532BIT-GOLANG-2022-30580

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.17.11, 1.18.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • os/exec

    fixed in 1.17.11; From 1.18.0-0 · fixed in 1.18.3

  • stdlibGo

    fixed in 1.17.11; From 1.18.0-0 · fixed in 1.18.3

References 5

go.dev

go.googlesource.com

groups.google.com

pkg.go.dev