Vulnerabilities / CVE-2023-39320

critical

CVE-2023-39320

golang: cmd/go: go.mod toolchain directive allows arbitrary execution

Published Modified CWE 94
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Bitnami9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Bitnami. Rated lower by Red Hat (high).

Description

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 packages and fixed versions

SourcePackageFixed in
bitnami::Bitnami Vulnerability Databasegolang1.21.1
alpine 3.19go1.21.1-r0
alpine 3.20go1.21.1-r0
alpine 3.21go1.21.1-r0
alpine 3.22go1.21.1-r0
alpine 3.23go1.21.1-r0
alpine 3.24go1.21.1-r0
alpine edgego1.21.1-r0
chainguardmetrics-server0.6.4-r1
wolfimetrics-server0.6.4-r1

References

All 10 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.