Paper/Archive/CVE-2023-39320

CVE-2023-39320

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

Description · from the CVE record

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.

Affected

ProductAffectedFixed inSource
cmd/go1.21.0-0 – < 1.21.11.21.1CNA

Scores by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA ADPSSVCExploitation: none · Automatable: yes · Technical impact: total

References

refgo.dev/issue/62198refgo.dev/cl/526158refgroups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJrefpkg.go.dev/vuln/GO-2023-2042refsecurity.netapp.com/advisory/ntap-20231020-0004refsecurity.gentoo.org/glsa/202311-09