CVE-2023-24531

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

Published Jul 2, 2024 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-7061-1 Go vulnerabilities
Ubuntu USN Ubuntu USN USN-7109-1 Go vulnerabilities
History
Type Values Removed Values Added
First Time appeared Gotoolchain
Gotoolchain cmd\/go
CPEs cpe:2.3:a:gotoolchain:cmd\/go:*:*:*:*:*:*:*:*
Vendors & Products Gotoolchain
Gotoolchain cmd\/go
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Mar 28, 2025, 3:02 PM
Reserved
Jan 25, 2023, 9:19 PM
Status
Deferred
Published
Jul 2, 2024, 8:15 PM
Modified
Jun 17, 2026, 5:39 AM