{"id":"CVE-2023-39320","aliases":["CVE-2023-39320","GO-2023-2042","BIT-GOLANG-2023-39320"],"related":["CGA-m5h9-c5w7-cg58"],"kind":"vulnerability","state":"published","title":"Arbitrary code execution via go.mod toolchain directive in cmd/go","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"La directiva de cadena de herramientas go.mod, introducida en Go 1.21, se puede aprovechar para ejecutar scripts y binarios relativos a la raíz del módulo cuando el comando \"go\" se ejecutó dentro del módulo. Esto se aplica a los módulos descargados utilizando el comando \"go\" desde el proxy del módulo, así como a los módulos descargados directamente mediante el software VCS.","source":"nvd"}],"published":"2023-09-07T16:11:28.000Z","modified":"2026-09-08T08:47:48.922Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"1.21.0-0","fixed":"1.21.1","status":"affected"}],"vendor":"Go toolchain","product":"cmd/go","package":"cmd/go","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.21.0-0","status":"affected","fixed":"1.21.1"}],"ecosystem":"Go","package":"toolchain","purl":"pkg:golang/toolchain","source":"go"},{"ranges":[{"status":"affected","introduced":"1.21.0","fixed":"1.21.1"}],"vendor":"golang","product":"go","cpe":"cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"1.21.0","status":"affected","fixed":"1.21.1"}],"ecosystem":"Bitnami","package":"golang","purl":"pkg:bitnami/golang","source":"bitnami"}],"references":[{"url":"https://go.dev/issue/62198","tags":["issue-tracking","report","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://go.dev/cl/526158","tags":["fix","patch","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://groups.google.com/g/golang-dev/c/2C5vbR-UNkI/m/L1hdrPhfBAAJ","tags":["article","release-notes","web","x-transferred"],"sources":["cvelist","go","nvd","bitnami"]},{"url":"https://pkg.go.dev/vuln/GO-2023-2042","tags":["advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20231020-0004/","tags":["advisory","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.gentoo.org/glsa/202311-09","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39320","tags":["web"],"sources":["bitnami"]}],"credits":["Juho Nurminen of Mattermost"],"assigner":"Go","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2024-09-26T17:28:10.391Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-39320","url":"https://www.cve.org/CVERecord?id=CVE-2023-39320","licence":"CVE Terms of Use","modified":"2025-02-13T17:02:48.022Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2023-2042","url":"https://pkg.go.dev/vuln/GO-2023-2042","licence":"CC-BY-4.0","modified":"2026-02-04T02:32:48.559Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-39320","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-39320","licence":"Public domain","modified":"2026-06-17T06:12:01.493Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-GOLANG-2023-39320","url":"https://osv.dev/vulnerability/BIT-GOLANG-2023-39320","licence":"Apache-2.0","modified":"2026-09-08T08:47:48.922Z"}],"updatedAt":"2026-11-25T22:58:27.766Z","epss":{"score":0.01757,"percentile":0.78619,"date":"2026-12-01T12:00:22.000Z"}}