VDB

CVE-2023-24531

CVE-2023-24531 PUBLISHED CVSS 9.8 CRITICAL

Output of "go env" does not sanitize values in cmd/go

Reported by go · Published July 2, 2024

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
toolchainGo Modules1.21.0-0
cmd/goGo Modules1.21.0-0
argo-workflowsChainguard3.6.5-r2
newrelic-fluent-bit-outputChainguard2.4.0-r5
kubeflow-katibChainguard0.19.0-r40, 0.19.0-r31
kubeflow-katibWolfi0.19.0-r40, 0.19.0-r31
newrelic-fluent-bit-outputWolfi2.4.0-r5
argo-workflowsWolfi3.6.5-r2
golangBitnami1.21.0-0
cmd\/gogotoolchain1.21.0-0
golangBitnami1.21.0-0

Risk scores

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

Affected products

VendorProductVersions
Go toolchaincmd/go0
chainguardargo-workflows0
chainguardnewrelic-fluent-bit-output0
gotoolchaincmd\/go0
chainguardkubeflow-katib0, 0
wolfikubeflow-katib0, 0
wolfinewrelic-fluent-bit-output0
Go toolchaincmd/go0
wolfiargo-workflows0

Timeline

  • Jul 2, 2024 CVE Published
  • Jul 3, 2024 EPSS Score (30 in total, the first dated here)
  • Mar 28, 2025 CVE Updated
  • Jun 2, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-24531
vulnetix vdb fixes CVE-2023-24531

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-24531/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›