Security mailing lists by PureSourceCode

CVE-2023-24531

CRITICAL 9.8CVSS 3.1

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

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.

Published
2 Jul 2024
Last modified
17 Jun 2026
Assigned by
security@golang.org
NVD status
Deferred
Also known as
BIT-golang-2023-24531GO-2024-2962
Sources
NVDJSONOSV GO-2024-2962JSON

Scores

SourceScored byVersionScoreVector / decision
NVD 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) CVSS 3.1 CRITICAL 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV Go toolchain < 1.21.0-0 1.21.0-0

References

History

  • 25 Nov 2026 20:55 UTC · NVD: first stored (published 2 Jul 2024)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Jul 2024)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.