CVE Tools

CVE-2023-24531

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

Published: Jul 2, 2024Updated: Mar 28, 2025 Sources: CVE List NVD BDU
9.8CVSSCRITICAL

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.

CVSS Vector Breakdown

AV:NAC:LPR:NUI:NS:UC:HI:HA:H
Exploitability
AV:NAttack Vector
Network
AC:LAttack Complexity
Low
PR:NPrivileges Required
None
UI:NUser Interaction
None
Scope
S:UScope
Unchanged
Impact
C:HConfidentiality
High
I:HIntegrity
High
A:HAvailability
High

Affected Products

canonical ltd.commercialGBOperating Systemsaka canonical
сообщество свободного программного обеспеченияoss-projectOperating Systemsaka сообщество свободного программного обеспечения, fsf
the go projectoss-projectOSS Librariesaka go, golang-google-protobuf, crypto
go toolchainoss-projectUSOSS Librariesaka golang, go compiler toolchain, cmd/go

Exploitability

Official Patch Available

References

and 10 more references View all →

Timeline

Published
Jul 2, 2024
Last Updated
Mar 28, 2025

Unlock Complete Vulnerability Intelligence

Get the full picture for CVE-2023-24531 and every CVE in our database. Create a free account — no credit card required.

Create Free Account
Plain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows