Skip to content
OpenAdvisories
High · 7.8 CVE-2022-30580 BIT-golang-2022-30580EUVD-2022-52429GHSA-2v97-2cxm-mvp4GO-2022-0532

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

Published Aug 9, 2022 · Updated Mar 6, 2026 · Assigned by Go

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.

Affected products

VendorProductAffectedFixed
Go standard library os/exec < 1.17.11, 1.18.0-0 – < 1.18.3 1.17.11

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP4 go1.17 1.17.11-150000.1.37.1 SUSE-SU-2022:2004-1
SLES 15 SP4 go1.18 1.18.3-150000.1.20.1 SUSE-SU-2022:2005-1
SLES 15 SP4 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
SLES 15 SP3 go1.17 1.17.11-150000.1.37.1 SUSE-SU-2022:2004-1
SLES 15 SP3 go1.18 1.18.3-150000.1.20.1 SUSE-SU-2022:2005-1
SLES 15 SP3 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP3 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
SLE Real Time 15 SP3 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
SLE HPC 15 SP3 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
SUSE Enterprise Storage 7.1 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed go1.17 1.17.11-1.1 openSUSE-SU-2024:12123-1
openSUSE Tumbleweed go1.18 1.18.3-1.1 openSUSE-SU-2024:12124-1
openSUSE Leap 15.5 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
openSUSE Leap 15.4 go1.17 1.17.11-150000.1.37.1 SUSE-SU-2022:2004-1
openSUSE Leap 15.4 go1.18 1.18.3-150000.1.20.1 SUSE-SU-2022:2005-1
openSUSE Leap 15.4 go1.18-openssl 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
openSUSE Leap 15.3 go1.17 1.17.11-150000.1.37.1 SUSE-SU-2022:2004-1
openSUSE Leap 15.3 go1.18 1.18.3-150000.1.20.1 SUSE-SU-2022:2005-1
ReleasePackageFixed inAdvisory
Alpine v3.16 go 1.18.4-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 golang +7 1.19.8-1.amzn2023.0.1 ALAS2023-2023-175
Amazon Linux 2 golang +7 1.18.9-1.amzn2.0.2 ALAS2-2023-2015

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 golang No fix yet —
Azure Linux 2 (CBL-Mariner) golang 1.18.5-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 delve 1.7.2-1.0.1.module+el8.6.0+20703+24a110ad ELSA-2022-17957, ELSA-2022-17956
Oracle Linux 8 go-toolset 1.17.11-1.module+el8.6.0+20703+24a110ad ELSA-2022-17957, ELSA-2022-17956
Oracle Linux 8 golang +6 1.17.11-1.0.1.module+el8.6.0+20703+24a110ad ELSA-2022-17957, ELSA-2022-17956

Affected packages

EcosystemPackageAffectedFixedRecord
Go stdlib < 1.17.11 · >= 1.18.0-0, < 1.18.3 1.17.11, 1.18.3 GO-2022-0532

Advisories 14

References