SecurityContext

CVE-2023-24531: Go - Command Injection

  • Cve: CVE-2023-24531
  • Name: Go - Command Injection
  • 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.
  • Impact: Attackers can execute arbitrary commands or modify environment variables if they can influence 'go env' output and execute it as a script.
  • Remediation: Avoid executing 'go env' output as a script; sanitize output before execution or do not run it directly as a script.
  • Vulnerability type: command_injection
  • Vulnerability impact: remote_code_execution
  • Requirement type: user_interaction
  • Requirements: Attacker needs to control environment variables and execute the output as a script
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00833
  • Epss percentile: 0.58405
  • Assignee: [email protected]
  • Published at: 2024-07-02T20:15:05Z
  • Age in days: 875
  • Modified at: 2026-06-17T05:39:28Z
  • Patch available: yes
  • References total: 6
  • Products total: 2
  • Oss: yes
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2023-24531
  • Nvd status: deferred
  • Checked, none or zero: cwe, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, projects total, projects, rejected by nvd
  • Not known: hackerone

References

Same in every row:

  • Source: nvd
  • Tags:
Url
https://go.dev/cl/488375
https://go.dev/cl/493535
https://go.dev/issue/58508
https://groups.google.com/g/golang-dev/c/ixHOFpSbajE/m/8EjlbKVWAwAJ
https://pkg.go.dev/vuln/GO-2024-2962
https://security.netapp.com/advisory/ntap-20250328-0005/

Products

ProductAffectedPlatform boundSourcesUrl
golang:go< 1.21.0-0nocna_alias/v1/products/golang/go
gotoolchain:cmd/go< 1.21.0-0noadp_cpes/v1/products/gotoolchain/cmd/go

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Exposed hosts: 1852470
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports