Search

Find a vulnerability

Search criteria Use this form to refine search results.
Full-text search supports keyword queries with ranking and filtering.
You can combine vendor, product, and sources to narrow results.
Enable “Apply ordering” to sort by date instead of relevance.

    6 vulnerabilities found for os/exec by Go standard library

    CVE-2025-47906 (GCVE-0-2025-47906)

    Vulnerability from nvd – Published: 2025-09-18 18:41 – Updated: 2025-11-04 21:10
    VLAI
    Title
    Unexpected paths returned from LookPath in os/exec
    Summary
    If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.
    SSVC
    Exploitation: none Automatable: no Technical Impact: partial
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-115 - Misinterpretation of Input
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library os/exec Affected: 0 , < 1.23.12 (semver)
    Affected: 1.24.0 , < 1.24.6 (semver)
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "LOW",
                  "baseScore": 6.5,
                  "baseSeverity": "MEDIUM",
                  "confidentialityImpact": "LOW",
                  "integrityImpact": "NONE",
                  "privilegesRequired": "NONE",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2025-47906",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2025-09-18T20:42:17.936162Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2025-09-18T20:42:38.389Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          },
          {
            "providerMetadata": {
              "dateUpdated": "2025-11-04T21:10:54.782Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "url": "http://www.openwall.com/lists/oss-security/2025/08/06/1"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "LookPath"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.23.12",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.24.6",
                  "status": "affected",
                  "version": "1.24.0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath (\"\", \".\", and \"..\"), can result in the binaries listed in the PATH being unexpectedly returned."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-115: Misinterpretation of Input",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2025-09-18T18:41:11.847Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/691775"
            },
            {
              "url": "https://go.dev/issue/74466"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/x5MKroML2yM"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2025-3956"
            }
          ],
          "title": "Unexpected paths returned from LookPath in os/exec"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2025-47906",
        "datePublished": "2025-09-18T18:41:11.847Z",
        "dateReserved": "2025-05-13T23:31:29.596Z",
        "dateUpdated": "2025-11-04T21:10:54.782Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2022-41716 (GCVE-0-2022-41716)

    Vulnerability from nvd – Published: 2022-11-02 15:28 – Updated: 2024-10-30 13:59
    VLAI
    Title
    Unsanitized NUL in environment variables on Windows in syscall and os/exec
    Summary
    Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows. In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string "A=B\x00C=D" sets the variables "A=B" and "C=D".
    SSVC
    Exploitation: none Automatable: no Technical Impact: partial
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-158 - Improper Neutralization of Null Byte or NUL Character
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library syscall Affected: 0 , < 1.18.8 (semver)
    Affected: 1.19.0-0 , < 1.19.3 (semver)
    Create a notification for this product.
    Go standard library os/exec Affected: 0 , < 1.18.8 (semver)
    Affected: 1.19.0-0 , < 1.19.3 (semver)
    Create a notification for this product.
    Credits
    RyotaK (https://twitter.com/ryotkak)
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-03T12:49:43.904Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "url": "https://security.netapp.com/advisory/ntap-20230120-0007/"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/56284"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/446916"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2022-1095"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "LOW",
                  "baseScore": 6.3,
                  "baseSeverity": "MEDIUM",
                  "confidentialityImpact": "LOW",
                  "integrityImpact": "LOW",
                  "privilegesRequired": "LOW",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2022-41716",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-01T14:02:04.861393Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-10-30T13:59:43.967Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "syscall",
              "platforms": [
                "windows"
              ],
              "product": "syscall",
              "programRoutines": [
                {
                  "name": "StartProcess"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.18.8",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.19.3",
                  "status": "affected",
                  "version": "1.19.0-0",
                  "versionType": "semver"
                }
              ]
            },
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "platforms": [
                "windows"
              ],
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "Cmd.environ"
                },
                {
                  "name": "dedupEnv"
                },
                {
                  "name": "dedupEnvCase"
                },
                {
                  "name": "Cmd.CombinedOutput"
                },
                {
                  "name": "Cmd.Environ"
                },
                {
                  "name": "Cmd.Output"
                },
                {
                  "name": "Cmd.Run"
                },
                {
                  "name": "Cmd.Start"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.18.8",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.19.3",
                  "status": "affected",
                  "version": "1.19.0-0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "RyotaK (https://twitter.com/ryotkak)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows. In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string \"A=B\\x00C=D\" sets the variables \"A=B\" and \"C=D\"."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-158: Improper Neutralization of Null Byte or NUL Character",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2023-06-12T19:12:49.198Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/issue/56284"
            },
            {
              "url": "https://go.dev/cl/446916"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2022-1095"
            }
          ],
          "title": "Unsanitized NUL in environment variables on Windows in syscall and os/exec"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2022-41716",
        "datePublished": "2022-11-02T15:28:19.574Z",
        "dateReserved": "2022-09-28T17:00:06.607Z",
        "dateUpdated": "2024-10-30T13:59:43.967Z",
        "requesterUserId": "7d08541a-cd0a-42e2-8f81-76e6ceb65fc3",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2022-30580 (GCVE-0-2022-30580)

    Vulnerability from nvd – Published: 2022-08-09 20:18 – Updated: 2026-03-06 17:34
    VLAI
    Title
    Empty Cmd.Path can trigger unintended binary in os/exec on Windows
    Summary
    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.
    SSVC
    Exploitation: none Automatable: no Technical Impact: total
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-94 - Improper Control of Generation of Code ('Code Injection')
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library os/exec Affected: 0 , < 1.17.11 (semver)
    Affected: 1.18.0-0 , < 1.18.3 (semver)
    Create a notification for this product.
    Credits
    Chris Darroch (chrisd8088@github.com) brian m. carlson (bk2204@github.com) Mikhail Shcherbakov (https://twitter.com/yu5k3)
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-03T06:56:12.971Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/403759"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/52574"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2022-0532"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "LOCAL",
                  "availabilityImpact": "HIGH",
                  "baseScore": 7.8,
                  "baseSeverity": "HIGH",
                  "confidentialityImpact": "HIGH",
                  "integrityImpact": "HIGH",
                  "privilegesRequired": "LOW",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2022-30580",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-02-24T20:37:17.158647Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "problemTypes": [
              {
                "descriptions": [
                  {
                    "cweId": "CWE-94",
                    "description": "CWE-94 Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                    "lang": "en",
                    "type": "CWE"
                  }
                ]
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-03-06T17:34:03.088Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "platforms": [
                "windows"
              ],
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "Cmd.Start"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.17.11",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.18.3",
                  "status": "affected",
                  "version": "1.18.0-0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "Chris Darroch (chrisd8088@github.com)"
            },
            {
              "lang": "en",
              "value": "brian m. carlson (bk2204@github.com)"
            },
            {
              "lang": "en",
              "value": "Mikhail Shcherbakov (https://twitter.com/yu5k3)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2023-06-12T19:12:35.518Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/403759"
            },
            {
              "url": "https://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e"
            },
            {
              "url": "https://go.dev/issue/52574"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2022-0532"
            }
          ],
          "title": "Empty Cmd.Path can trigger unintended binary in os/exec on Windows"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2022-30580",
        "datePublished": "2022-08-09T20:18:04.000Z",
        "dateReserved": "2022-05-11T00:00:00.000Z",
        "dateUpdated": "2026-03-06T17:34:03.088Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2025-47906 (GCVE-0-2025-47906)

    Vulnerability from cvelistv5 – Published: 2025-09-18 18:41 – Updated: 2025-11-04 21:10
    VLAI
    Title
    Unexpected paths returned from LookPath in os/exec
    Summary
    If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath ("", ".", and ".."), can result in the binaries listed in the PATH being unexpectedly returned.
    SSVC
    Exploitation: none Automatable: no Technical Impact: partial
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-115 - Misinterpretation of Input
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library os/exec Affected: 0 , < 1.23.12 (semver)
    Affected: 1.24.0 , < 1.24.6 (semver)
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "LOW",
                  "baseScore": 6.5,
                  "baseSeverity": "MEDIUM",
                  "confidentialityImpact": "LOW",
                  "integrityImpact": "NONE",
                  "privilegesRequired": "NONE",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2025-47906",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2025-09-18T20:42:17.936162Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2025-09-18T20:42:38.389Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          },
          {
            "providerMetadata": {
              "dateUpdated": "2025-11-04T21:10:54.782Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "url": "http://www.openwall.com/lists/oss-security/2025/08/06/1"
              }
            ],
            "title": "CVE Program Container"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "LookPath"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.23.12",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.24.6",
                  "status": "affected",
                  "version": "1.24.0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "If the PATH environment variable contains paths which are executables (rather than just directories), passing certain strings to LookPath (\"\", \".\", and \"..\"), can result in the binaries listed in the PATH being unexpectedly returned."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-115: Misinterpretation of Input",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2025-09-18T18:41:11.847Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/691775"
            },
            {
              "url": "https://go.dev/issue/74466"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/x5MKroML2yM"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2025-3956"
            }
          ],
          "title": "Unexpected paths returned from LookPath in os/exec"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2025-47906",
        "datePublished": "2025-09-18T18:41:11.847Z",
        "dateReserved": "2025-05-13T23:31:29.596Z",
        "dateUpdated": "2025-11-04T21:10:54.782Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }

    CVE-2022-41716 (GCVE-0-2022-41716)

    Vulnerability from cvelistv5 – Published: 2022-11-02 15:28 – Updated: 2024-10-30 13:59
    VLAI
    Title
    Unsanitized NUL in environment variables on Windows in syscall and os/exec
    Summary
    Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows. In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string "A=B\x00C=D" sets the variables "A=B" and "C=D".
    SSVC
    Exploitation: none Automatable: no Technical Impact: partial
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-158 - Improper Neutralization of Null Byte or NUL Character
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library syscall Affected: 0 , < 1.18.8 (semver)
    Affected: 1.19.0-0 , < 1.19.3 (semver)
    Create a notification for this product.
    Go standard library os/exec Affected: 0 , < 1.18.8 (semver)
    Affected: 1.19.0-0 , < 1.19.3 (semver)
    Create a notification for this product.
    Credits
    RyotaK (https://twitter.com/ryotkak)
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-03T12:49:43.904Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "url": "https://security.netapp.com/advisory/ntap-20230120-0007/"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/56284"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/446916"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2022-1095"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "LOW",
                  "baseScore": 6.3,
                  "baseSeverity": "MEDIUM",
                  "confidentialityImpact": "LOW",
                  "integrityImpact": "LOW",
                  "privilegesRequired": "LOW",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2022-41716",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-01T14:02:04.861393Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-10-30T13:59:43.967Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "syscall",
              "platforms": [
                "windows"
              ],
              "product": "syscall",
              "programRoutines": [
                {
                  "name": "StartProcess"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.18.8",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.19.3",
                  "status": "affected",
                  "version": "1.19.0-0",
                  "versionType": "semver"
                }
              ]
            },
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "platforms": [
                "windows"
              ],
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "Cmd.environ"
                },
                {
                  "name": "dedupEnv"
                },
                {
                  "name": "dedupEnvCase"
                },
                {
                  "name": "Cmd.CombinedOutput"
                },
                {
                  "name": "Cmd.Environ"
                },
                {
                  "name": "Cmd.Output"
                },
                {
                  "name": "Cmd.Run"
                },
                {
                  "name": "Cmd.Start"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.18.8",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.19.3",
                  "status": "affected",
                  "version": "1.19.0-0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "RyotaK (https://twitter.com/ryotkak)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "Due to unsanitized NUL values, attackers may be able to maliciously set environment variables on Windows. In syscall.StartProcess and os/exec.Cmd, invalid environment variable values containing NUL values are not properly checked for. A malicious environment variable value can exploit this behavior to set a value for a different environment variable. For example, the environment variable string \"A=B\\x00C=D\" sets the variables \"A=B\" and \"C=D\"."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-158: Improper Neutralization of Null Byte or NUL Character",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2023-06-12T19:12:49.198Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/issue/56284"
            },
            {
              "url": "https://go.dev/cl/446916"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/mbHY1UY3BaM/m/hSpmRzk-AgAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2022-1095"
            }
          ],
          "title": "Unsanitized NUL in environment variables on Windows in syscall and os/exec"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2022-41716",
        "datePublished": "2022-11-02T15:28:19.574Z",
        "dateReserved": "2022-09-28T17:00:06.607Z",
        "dateUpdated": "2024-10-30T13:59:43.967Z",
        "requesterUserId": "7d08541a-cd0a-42e2-8f81-76e6ceb65fc3",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2022-30580 (GCVE-0-2022-30580)

    Vulnerability from cvelistv5 – Published: 2022-08-09 20:18 – Updated: 2026-03-06 17:34
    VLAI
    Title
    Empty Cmd.Path can trigger unintended binary in os/exec on Windows
    Summary
    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.
    SSVC
    Exploitation: none Automatable: no Technical Impact: total
    CISA Coordinator (v2.0.3)
    CWE
    • CWE-94 - Improper Control of Generation of Code ('Code Injection')
    Assigner
    Go
    Impacted products
    Vendor Product Version
    Go standard library os/exec Affected: 0 , < 1.17.11 (semver)
    Affected: 1.18.0-0 , < 1.18.3 (semver)
    Create a notification for this product.
    Credits
    Chris Darroch (chrisd8088@github.com) brian m. carlson (bk2204@github.com) Mikhail Shcherbakov (https://twitter.com/yu5k3)
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-03T06:56:12.971Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/403759"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/52574"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2022-0532"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "LOCAL",
                  "availabilityImpact": "HIGH",
                  "baseScore": 7.8,
                  "baseSeverity": "HIGH",
                  "confidentialityImpact": "HIGH",
                  "integrityImpact": "HIGH",
                  "privilegesRequired": "LOW",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2022-30580",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-02-24T20:37:17.158647Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "problemTypes": [
              {
                "descriptions": [
                  {
                    "cweId": "CWE-94",
                    "description": "CWE-94 Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                    "lang": "en",
                    "type": "CWE"
                  }
                ]
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-03-06T17:34:03.088Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "os/exec",
              "platforms": [
                "windows"
              ],
              "product": "os/exec",
              "programRoutines": [
                {
                  "name": "Cmd.Start"
                }
              ],
              "vendor": "Go standard library",
              "versions": [
                {
                  "lessThan": "1.17.11",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThan": "1.18.3",
                  "status": "affected",
                  "version": "1.18.0-0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "Chris Darroch (chrisd8088@github.com)"
            },
            {
              "lang": "en",
              "value": "brian m. carlson (bk2204@github.com)"
            },
            {
              "lang": "en",
              "value": "Mikhail Shcherbakov (https://twitter.com/yu5k3)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2023-06-12T19:12:35.518Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/403759"
            },
            {
              "url": "https://go.googlesource.com/go/+/960ffa98ce73ef2c2060c84c7ac28d37a83f345e"
            },
            {
              "url": "https://go.dev/issue/52574"
            },
            {
              "url": "https://groups.google.com/g/golang-announce/c/TzIC9-t8Ytg/m/IWz5T6x7AAAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2022-0532"
            }
          ],
          "title": "Empty Cmd.Path can trigger unintended binary in os/exec on Windows"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2022-30580",
        "datePublished": "2022-08-09T20:18:04.000Z",
        "dateReserved": "2022-05-11T00:00:00.000Z",
        "dateUpdated": "2026-03-06T17:34:03.088Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }