CVE-2023-39320
Arbitrary code execution via go.mod toolchain directive in cmd/go
CRITICAL 9.8
At a glance
- Source
- NVD
- EPSS
- EPSS 1.76 % · percentile 78 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- Go
- NVD status
- Modified
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.
Weaknesses (CWE)
- CWE-94 — Code Injection
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | NVD · nvd@nist.gov (Primary) |
Advisories
- GO-2023-2042 — Arbitrary code execution via go.mod toolchain directive in cmd/go
European references
- ENISA EUVD · EUVD-2023-43052
- GCVE · GCVE-0-2023-39320
CERT-FR advisories
- CERTFR-2025-AVI-0283 — Multiples vulnérabilités dans VMware Tanzu Greenplum · cert.ssi.gouv.fr
- CERTFR-2024-AVI-0878 — Multiples vulnérabilités dans les produits Splunk · cert.ssi.gouv.fr
- CERTFR-2024-AVI-0646 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Affected configurations (NVD CPE)
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*≥ 1.21.0 < 1.21.1
Affected products
| Product | Versions |
|---|---|
| Go toolchain · cmd/go | affected 1.21.0-0 < 1.21.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |