LiveActive security incident?Get immediate response
CVE Record

CVE-2022-30580: Empty Cmd.Path can trigger unintended binary in os/exec on Windows

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

This issue affects Go programs on Windows that use the standard os/exec package in an unsafe edge case. A local attacker who can influence the working directory may cause the program to run an unintended local binary, leading to full confidentiality, integrity, and availability impact in that process context.

Executive priority

Treat as a high-priority engineering remediation for Windows Go workloads, especially privileged services. Urgency is below emergency patching because sources do not show active exploitation, but affected binaries should be rebuilt during the next controlled release window.

Technical view

Before Go 1.17.11 and 1.18.3, os/exec Cmd.Start could execute an unintended binary from the working directory when Cmd.Path was unset and Run, Start, Output, or CombinedOutput was called on Windows. The CVE is scored CVSS 7.8 with local, low-complexity, low-privilege prerequisites.

Likely exposure

Exposure is most likely in Windows-hosted Go applications built with affected Go releases and using os/exec with Cmd.Path unset. Risk rises where an attacker can write to or control the process working directory. Non-Windows deployments are not indicated by the provided sources.

Exploitation context

The CVE is not listed in KEV, and the provided sources do not state active exploitation. The attack requires local access or equivalent ability to place a file in the relevant working directory, but successful abuse could run code with the vulnerable process privileges.

Researcher notes

Focus review on Windows os/exec call sites and process working-directory control. The Go issue, change list, commit, announcement, and GO-2022-0532 entry consistently identify the vulnerable behavior and fixed release lines. Evidence is sufficient for affected-version and remediation direction.

Mitigation direction

  • Upgrade Go toolchains to 1.17.11, 1.18.3, or later supported releases.
  • Rebuild and redeploy Windows Go binaries built with affected Go versions.
  • Audit os/exec usage where Cmd.Path may be unset.
  • Restrict write access to service and application working directories.
  • Check official Go guidance for any application-specific follow-up.

Validation and detection

  • Inventory Go versions used to build Windows applications and services.
  • Identify applications calling Cmd.Run, Cmd.Start, Cmd.Output, or Cmd.CombinedOutput.
  • Review code paths where Cmd.Path may be empty or implicitly derived.
  • Verify service working directories are not attacker-writable.
  • Confirm rebuilt binaries use a fixed Go release.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-30580 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2022-30580Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Go standard libraryos/execos/exec, 0, 1.18.0-0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-94 · source CWE mapping

Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.