Skip to main content
← All vulnerabilities
CVE-2023-39320GO-2023-2042BIT-GOLANG-2023-39320

Arbitrary code execution via go.mod toolchain directive in cmd/go

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.21.1
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: total

Summary

The go.mod toolchain directive, introduced in Go 1.21, can be leveraged to execute scripts and binaries relative to the root of the module when the "go" command was executed within the module. This applies to modules downloaded using the "go" command from the module proxy, as well as modules downloaded directly using VCS software.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • cmd/go

    From 1.21.0-0 · fixed in 1.21.1

  • toolchainGo

    From 1.21.0-0 · fixed in 1.21.1

References 7

go.dev

groups.google.com

pkg.go.dev

security.netapp.com

security.gentoo.org

GitHub · ayrustogaru/cve-2023-39320