CVE-2023-24531
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| toolchain | Go Modules | 1.21.0-0 |
| cmd/go | Go Modules | 1.21.0-0 |
| argo-workflows | Chainguard | 3.6.5-r2 |
| newrelic-fluent-bit-output | Chainguard | 2.4.0-r5 |
| kubeflow-katib | Chainguard | 0.19.0-r40, 0.19.0-r31 |
| kubeflow-katib | Wolfi | 0.19.0-r40, 0.19.0-r31 |
| newrelic-fluent-bit-output | Wolfi | 2.4.0-r5 |
| argo-workflows | Wolfi | 3.6.5-r2 |
| golang | Bitnami | 1.21.0-0 |
| cmd\/go | gotoolchain | 1.21.0-0 |
| golang | Bitnami | 1.21.0-0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Go toolchain | cmd/go | 0 |
| chainguard | argo-workflows | 0 |
| chainguard | newrelic-fluent-bit-output | 0 |
| gotoolchain | cmd\/go | 0 |
| chainguard | kubeflow-katib | 0, 0 |
| wolfi | kubeflow-katib | 0, 0 |
| wolfi | newrelic-fluent-bit-output | 0 |
| Go toolchain | cmd/go | 0 |
| wolfi | argo-workflows | 0 |
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