CVE-2023-24531 (GCVE-0-2023-24531)
Vulnerability from cvelistv5
Published
2024-07-02 19:51
Modified
2025-03-28 15:02
Severity ?
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.
Impacted products
Vendor Product Version
Go toolchain cmd/go Version: 0   
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'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.",
            },
         ],
         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",
   "vulnerability-lookup:meta": {
      fkie_nvd: {
         descriptions: "[{\"lang\": \"en\", \"value\": \"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.\"}, {\"lang\": \"es\", \"value\": \"Est\\u00e1 documentado que el comando go env genera un script de shell que contiene el entorno Go. Sin embargo, go env no sanitiza los valores, por lo que ejecutar su salida como un script de shell puede causar varios malos comportamientos, incluida la ejecuci\\u00f3n de comandos arbitrarios o la inserci\\u00f3n de nuevas variables de entorno. Este problema es relativamente menor porque, en general, si un atacante puede establecer variables de entorno arbitrarias en un sistema, tiene mejores vectores de ataque que hacer que \\\"go env\\\" las imprima.\"}]",
         id: "CVE-2023-24531",
         lastModified: "2024-11-21T07:48:04.190",
         metrics: "{\"cvssMetricV31\": [{\"source\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"type\": \"Secondary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"baseScore\": 9.8, \"baseSeverity\": \"CRITICAL\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"LOW\", \"privilegesRequired\": \"NONE\", \"userInteraction\": \"NONE\", \"scope\": \"UNCHANGED\", \"confidentialityImpact\": \"HIGH\", \"integrityImpact\": \"HIGH\", \"availabilityImpact\": \"HIGH\"}, \"exploitabilityScore\": 3.9, \"impactScore\": 5.9}]}",
         published: "2024-07-02T20:15:05.270",
         references: "[{\"url\": \"https://go.dev/cl/488375\", \"source\": \"security@golang.org\"}, {\"url\": \"https://go.dev/cl/493535\", \"source\": \"security@golang.org\"}, {\"url\": \"https://go.dev/issue/58508\", \"source\": \"security@golang.org\"}, {\"url\": \"https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ\", \"source\": \"security@golang.org\"}, {\"url\": \"https://pkg.go.dev/vuln/GO-2024-2962\", \"source\": \"security@golang.org\"}, {\"url\": \"https://go.dev/cl/488375\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://go.dev/cl/493535\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://go.dev/issue/58508\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://pkg.go.dev/vuln/GO-2024-2962\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}]",
         sourceIdentifier: "security@golang.org",
         vulnStatus: "Awaiting Analysis",
      },
      nvd: "{\"cve\":{\"id\":\"CVE-2023-24531\",\"sourceIdentifier\":\"security@golang.org\",\"published\":\"2024-07-02T20:15:05.270\",\"lastModified\":\"2025-03-28T15:15:43.630\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"},{\"lang\":\"es\",\"value\":\"Está documentado que el comando go env genera un script de shell que contiene el entorno Go. Sin embargo, go env no sanitiza los valores, por lo que ejecutar su salida como un script de shell puede causar varios malos comportamientos, incluida la ejecución de comandos arbitrarios o la inserción de nuevas variables de entorno. Este problema es relativamente menor porque, en general, si un atacante puede establecer variables de entorno arbitrarias en un sistema, tiene mejores vectores de ataque que hacer que \\\"go env\\\" las imprima.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":9.8,\"baseSeverity\":\"CRITICAL\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://go.dev/cl/488375\",\"source\":\"security@golang.org\"},{\"url\":\"https://go.dev/cl/493535\",\"source\":\"security@golang.org\"},{\"url\":\"https://go.dev/issue/58508\",\"source\":\"security@golang.org\"},{\"url\":\"https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ\",\"source\":\"security@golang.org\"},{\"url\":\"https://pkg.go.dev/vuln/GO-2024-2962\",\"source\":\"security@golang.org\"},{\"url\":\"https://go.dev/cl/488375\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://go.dev/cl/493535\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://go.dev/issue/58508\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://pkg.go.dev/vuln/GO-2024-2962\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://security.netapp.com/advisory/ntap-20250328-0005/\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}",
      vulnrichment: {
         containers: "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"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\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://security.netapp.com/advisory/ntap-20250328-0005/\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-03-28T15:02:59.076Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 9.8, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"CRITICAL\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2023-24531\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"yes\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-08-21T13:30:10.564913Z\"}}}], \"affected\": [{\"cpes\": [\"cpe:2.3:a:gotoolchain:cmd\\\\/go:*:*:*:*:*:*:*:*\"], \"vendor\": \"gotoolchain\", \"product\": \"cmd\\\\/go\", \"versions\": [{\"status\": \"affected\", \"version\": \"0\", \"lessThan\": \"1.21.0-0\", \"versionType\": \"semver\"}], \"defaultStatus\": \"unknown\"}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-08-21T13:49:38.071Z\"}}], \"cna\": {\"title\": \"Output of \\\"go env\\\" does not sanitize values in cmd/go\", \"credits\": [{\"lang\": \"en\", \"value\": \"Hunter Wittenborn (https://hunterwittenborn.com/)\"}], \"affected\": [{\"vendor\": \"Go toolchain\", \"product\": \"cmd/go\", \"versions\": [{\"status\": \"affected\", \"version\": \"0\", \"lessThan\": \"1.21.0-0\", \"versionType\": \"semver\"}], \"packageName\": \"cmd/go\", \"collectionURL\": \"https://pkg.go.dev\", \"defaultStatus\": \"unaffected\"}], \"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\"}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"description\": \"CWE-138: Improper Neutralization of Special Elements\"}]}], \"providerMetadata\": {\"orgId\": \"1bb62c36-49e3-4200-9d77-64a1400537cc\", \"shortName\": \"Go\", \"dateUpdated\": \"2024-07-02T19:51:48.731Z\"}}}",
         cveMetadata: "{\"cveId\": \"CVE-2023-24531\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-03-28T15:02:59.076Z\", \"dateReserved\": \"2023-01-25T21:19:20.641Z\", \"assignerOrgId\": \"1bb62c36-49e3-4200-9d77-64a1400537cc\", \"datePublished\": \"2024-07-02T19:51:48.731Z\", \"assignerShortName\": \"Go\"}",
         dataType: "CVE_RECORD",
         dataVersion: "5.1",
      },
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.