GO-2022-0532

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

At a glance

Published
Updated
CVE
CVE-2022-30580
Aliases
BIT-golang-2022-30580

Description

On Windows, executing Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput when Cmd.Path is unset will unintentionally trigger execution of any binaries in the working directory named either "..com" or "..exe".

Affected packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.17.11, introduced 1.18.0-0, fixed 1.18.3

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database