cve.bz

CVE-2023-39320 golang go: Code Injection

9.8 criticalEPSS 1.8%Fix available

Critical (9.8) in golang go. EPSS 1.8% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.21.1.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.8% (unchanged from 1.8% a week ago; 1.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 79th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2024-09-26. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-39320 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-39320?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-39320?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-39320 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Go toolchain cmd/gofrom 1.21.0-0 before 1.21.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2023-2042Gotoolchain>=1.21.0-0 <1.21.11.21.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5go1.211.21.1-150000.1.6.1SUSE-SU-2023:3701-1
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5go1.21-openssl1.21.4.1-150000.1.5.1SUSE-SU-2023:4469-1
SUSEPackage Hub 12go1.21-41.1openSUSE-SU-2023:0360-1
SUSEPackage Hub 12go1.211.21.3-2.1openSUSE-SU-2023:0360-1
openSUSELeap 15.4, Leap 15.5go1.211.21.1-150000.1.6.1SUSE-SU-2023:3701-1
openSUSELeap 15.4, Leap 15.5go1.21-openssl1.21.4.1-150000.1.5.1SUSE-SU-2023:4469-1
openSUSETumbleweedgo1.211.21.1-1.1openSUSE-SU-2024:13217-1
Alpinev3.19, v3.20, v3.21 and 3 morego1.21.1-r0ALPINE-CVE-2023-39320
Alpaquita23go1.21.7-r0BELL-CVE-2023-39320
BellSoft Hardened Containers23go1.21.7-r0BELL-CVE-2023-39320

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
OpenShift Service Mesh 2openshift-golang-builder-containerNot affected
Red Hat Enterprise Linux 8go-toolset:rhel8/golangNot affected
Red Hat Enterprise Linux 8go-toolset:rhel8/go-toolsetNot affected
Red Hat Enterprise Linux 9golangNot affected
Red Hat OpenShift Container Platform 4openshift-golang-builder-containerNot affected
Red Hat OpenShift Virtualization 4openshift-golang-builder-containerNot affected
Red Hat Storage 3golangNot affected
Red Hat Storage 3go-toolset-7-golangNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-39320.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON