Live threats

All CVEs / Go toolchain

CVE-2023-24531Go toolchain cmd/go

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
1.6%
probability of exploitation in 30 days · percentile 76
Auth required
No
Published
Jul 2, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for cmd/go.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go toolchain < 1.21.0-0 1.21.0-0 go get toolchain@v1.21.0-0

Per OSV / GitHub Advisories (GO-2024-2962). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.