// For flags

CVE-2023-24531

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

Severity Score

9.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Attend
*SSVC
Descriptions

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.

Está documentado que el comando go env genera un script de shell que contiene el entorno Go. Sin embargo, go env no sanitiza los valores, por lo que ejecutar su salida como un script de shell puede causar varios malos comportamientos, incluida la ejecución de comandos arbitrarios o la inserción de nuevas variables de entorno. Este problema es relativamente menor porque, en general, si un atacante puede establecer variables de entorno arbitrarias en un sistema, tiene mejores vectores de ataque que hacer que "go env" las imprima.

*Credits: Hunter Wittenborn (https://hunterwittenborn.com/)
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Attend
Exploitation
None
Automatable
Yes
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2023-01-25 CVE Reserved
  • 2024-07-02 CVE Published
  • 2024-07-03 EPSS Updated
  • 2024-08-21 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Go Toolchain
Search vendor "Go Toolchain"
Cmd/go
Search vendor "Go Toolchain" for product "Cmd/go"
< 1.21.0-0
Search vendor "Go Toolchain" for product "Cmd/go" and version " < 1.21.0-0"
en
Affected