title: Empty Cmd.Path can trigger unintended binary in os/exec on Windows
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.
problem types: CWE-94: Improper Control of Generation of Code ('Code Injection')
affected:
{
vendor: Go standard library
product: os/exec
collectionURL: https://pkg.go.dev
packageName: os/exec
versions:
version: 0, lessThan: 1.17.11, status: affected, versionType: semver
version: 1.18.0-0, lessThan: 1.18.3, status: affected, versionType: semver
platforms: windows
programRoutines:
name: Cmd.Start
defaultStatus: unaffected
}