CVE-2022-30580
golang: os/exec: Code injection in Cmd.Start
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 10, 2022
Updated · November 1, 2026
Description
A flaw was found in the os/exec golang package. This issue occurs when invoking different Cmd methods and the Cmd.Path is unset. This could lead to a command injection, allowing an attacker to execute any binaries in the working directory.
Statement
The CVE-2022-30580 affects windows only, where empty Cmd.Path can result in running unintended binary on Windows. Packages shipped with Red Hat Enterprise Linux - 8 and 9 are unaffected.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-94 · Improper Control of Generation of Code