Search

Find a vulnerability

Search criteria

    2 vulnerabilities found for cmd\/go by gotoolchain

    CVE-2023-24531 (GCVE-0-2023-24531)

    Vulnerability from nvd – Published: 2024-07-02 19:51 – Updated: 2025-03-28 15:02
    VLAI
    Title
    Output of "go env" does not sanitize values in cmd/go
    Summary
    Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn't sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making "go env" print them out.
    SSVC
    Exploitation: none Automatable: yes Technical Impact: total
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2024-08-21 13:30 UTC
    CWE
    • CWE-138 - Improper Neutralization of Special Elements
    Assigner
    Impacted products
    Vendor Product Version
    Go toolchain cmd/go Affected: 0 , < 1.21.0-0 (semver)
    Create a notification for this product.
    gotoolchain cmd\/go Affected: 0 , < 1.21.0-0 (semver)
        cpe:2.3:a:gotoolchain:cmd\/go:*:*:*:*:*:*:*:*
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2025-03-28T15:02:59.076Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/488375"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/493535"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/58508"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2024-2962"
              },
              {
                "url": "https://security.netapp.com/advisory/ntap-20250328-0005/"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "affected": [
              {
                "cpes": [
                  "cpe:2.3:a:gotoolchain:cmd\\/go:*:*:*:*:*:*:*:*"
                ],
                "defaultStatus": "unknown",
                "product": "cmd\\/go",
                "vendor": "gotoolchain",
                "versions": [
                  {
                    "lessThan": "1.21.0-0",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  }
                ]
              }
            ],
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "HIGH",
                  "baseScore": 9.8,
                  "baseSeverity": "CRITICAL",
                  "confidentialityImpact": "HIGH",
                  "integrityImpact": "HIGH",
                  "privilegesRequired": "NONE",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2023-24531",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-21T13:30:10.564913Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-08-21T13:49:46.839Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "cmd/go",
              "product": "cmd/go",
              "vendor": "Go toolchain",
              "versions": [
                {
                  "lessThan": "1.21.0-0",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "Hunter Wittenborn (https://hunterwittenborn.com/)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn\u0027t sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making \"go env\" print them out."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-138: Improper Neutralization of Special Elements",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2024-07-02T19:51:48.731Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/488375"
            },
            {
              "url": "https://go.dev/cl/493535"
            },
            {
              "url": "https://go.dev/issue/58508"
            },
            {
              "url": "https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2024-2962"
            }
          ],
          "title": "Output of \"go env\" does not sanitize values in cmd/go"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2023-24531",
        "datePublished": "2024-07-02T19:51:48.731Z",
        "dateReserved": "2023-01-25T21:19:20.641Z",
        "dateUpdated": "2025-03-28T15:02:59.076Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }

    CVE-2023-24531 (GCVE-0-2023-24531)

    Vulnerability from cvelistv5 – Published: 2024-07-02 19:51 – Updated: 2025-03-28 15:02
    VLAI
    Title
    Output of "go env" does not sanitize values in cmd/go
    Summary
    Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn't sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making "go env" print them out.
    SSVC
    Exploitation: none Automatable: yes Technical Impact: total
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2024-08-21 13:30 UTC
    CWE
    • CWE-138 - Improper Neutralization of Special Elements
    Assigner
    Impacted products
    Vendor Product Version
    Go toolchain cmd/go Affected: 0 , < 1.21.0-0 (semver)
    Create a notification for this product.
    gotoolchain cmd\/go Affected: 0 , < 1.21.0-0 (semver)
        cpe:2.3:a:gotoolchain:cmd\/go:*:*:*:*:*:*:*:*
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2025-03-28T15:02:59.076Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/488375"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/cl/493535"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://go.dev/issue/58508"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://pkg.go.dev/vuln/GO-2024-2962"
              },
              {
                "url": "https://security.netapp.com/advisory/ntap-20250328-0005/"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "affected": [
              {
                "cpes": [
                  "cpe:2.3:a:gotoolchain:cmd\\/go:*:*:*:*:*:*:*:*"
                ],
                "defaultStatus": "unknown",
                "product": "cmd\\/go",
                "vendor": "gotoolchain",
                "versions": [
                  {
                    "lessThan": "1.21.0-0",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  }
                ]
              }
            ],
            "metrics": [
              {
                "cvssV3_1": {
                  "attackComplexity": "LOW",
                  "attackVector": "NETWORK",
                  "availabilityImpact": "HIGH",
                  "baseScore": 9.8,
                  "baseSeverity": "CRITICAL",
                  "confidentialityImpact": "HIGH",
                  "integrityImpact": "HIGH",
                  "privilegesRequired": "NONE",
                  "scope": "UNCHANGED",
                  "userInteraction": "NONE",
                  "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                  "version": "3.1"
                }
              },
              {
                "other": {
                  "content": {
                    "id": "CVE-2023-24531",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "total"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-08-21T13:30:10.564913Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-08-21T13:49:46.839Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://pkg.go.dev",
              "defaultStatus": "unaffected",
              "packageName": "cmd/go",
              "product": "cmd/go",
              "vendor": "Go toolchain",
              "versions": [
                {
                  "lessThan": "1.21.0-0",
                  "status": "affected",
                  "version": "0",
                  "versionType": "semver"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "value": "Hunter Wittenborn (https://hunterwittenborn.com/)"
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn\u0027t sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making \"go env\" print them out."
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "description": "CWE-138: Improper Neutralization of Special Elements",
                  "lang": "en"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2024-07-02T19:51:48.731Z",
            "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
            "shortName": "Go"
          },
          "references": [
            {
              "url": "https://go.dev/cl/488375"
            },
            {
              "url": "https://go.dev/cl/493535"
            },
            {
              "url": "https://go.dev/issue/58508"
            },
            {
              "url": "https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ"
            },
            {
              "url": "https://pkg.go.dev/vuln/GO-2024-2962"
            }
          ],
          "title": "Output of \"go env\" does not sanitize values in cmd/go"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "assignerShortName": "Go",
        "cveId": "CVE-2023-24531",
        "datePublished": "2024-07-02T19:51:48.731Z",
        "dateReserved": "2023-01-25T21:19:20.641Z",
        "dateUpdated": "2025-03-28T15:02:59.076Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }