CVE-2023-39320: 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.
Critical CVSS 9.8
- CVE id
- CVE-2023-39320
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Go Runtimes and servers |
>= 1.21.0, < 1.21.1 | 1.21.1 |
How to fix it
Upgrade Go to 1.21.1 or later.
go version
- Build with the patched Go release (set "toolchain" in go.mod, or the golang image tag) and redeploy: Go programs include the standard library, so they must be rebuilt.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2023-39320 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2023-39320
- Web: https://go.dev/cl/526158
- Web: https://go.dev/issue/62198
- Web: https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- Web: https://pkg.go.dev/vuln/GO-2023-2042
- Web: https://security.gentoo.org/glsa/202311-09
- Web: https://security.netapp.com/advisory/ntap-20231020-0004/
- Web: https://go.dev/cl/526158
- Web: https://go.dev/issue/62198
- Web: https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ
- Web: https://pkg.go.dev/vuln/GO-2023-2042
- Web: https://security.gentoo.org/glsa/202311-09
- Web: https://security.netapp.com/advisory/ntap-20231020-0004/
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.