cve.bz

CVE-2023-39323

8.1 highEPSS 1.9%Fix available

High (8.1). EPSS 1.9% estimated probability of exploitation activity in the next 30 days. Fixed in toolchain 1.20.9, 1.21.2.

On this page
Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 80th 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: no · Technical impact: total, assessed 2025-06-12. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
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-39323 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-39323?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-39323?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-39323 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/gobefore 1.20.9
Go toolchain cmd/gofrom 1.21.0-0 before 1.21.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GO-2023-2095Gotoolchain<1.20.9
>=1.21.0-0 <1.21.2
1.20.9, 1.21.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-1.19no fix listedDEBIAN-CVE-2023-39323
Ubuntu20.04:LTSgolang-1.181.18.1-1ubuntu1~20.04.3UBUNTU-CVE-2023-39323 USN-7109-1
Ubuntu20.04:LTSgolang-1.201.20.3-1ubuntu0.1~20.04.1UBUNTU-CVE-2023-39323 USN-6574-1
Ubuntu20.04:LTSgolang-1.211.21.1-1~ubuntu20.04.2UBUNTU-CVE-2023-39323 USN-6574-1
Ubuntu22.04:LTSgolang-1.171.17.13-3ubuntu1.3UBUNTU-CVE-2023-39323 USN-7111-1
Ubuntu22.04:LTSgolang-1.181.18.1-1ubuntu1.2UBUNTU-CVE-2023-39323 USN-7109-1
Ubuntu22.04:LTSgolang-1.201.20.3-1ubuntu0.1~22.04.1UBUNTU-CVE-2023-39323 USN-6574-1
Ubuntu22.04:LTSgolang-1.211.21.1-1~ubuntu22.04.2UBUNTU-CVE-2023-39323 USN-6574-1
UbuntuPro:16.04:LTSgolang-1.181.18.1-1ubuntu1~16.04.6+esm1UBUNTU-CVE-2023-39323 USN-7109-1
UbuntuPro:18.04:LTSgolang-1.181.18.1-1ubuntu1~18.04.4+esm1UBUNTU-CVE-2023-39323 USN-7109-1
Red Hatenterprise_linux:8::appstreamdelve, delve-debuginfo, delve-debugsource0:1.20.2-1.module+el8.9.0+18926+5193682dRHBA-2023:6928
Red Hatenterprise_linux:8::appstreamgolang, go-toolset, golang-bin and 4 more0:1.20.10-1.module+el8.9.0+20382+04f7fe80RHBA-2023:6928
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5go1.201.20.9-150000.1.26.1SUSE-SU-2023:4018-1
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5go1.20-openssl1.20.11.1-150000.1.14.1SUSE-SU-2023:4472-1
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5go1.211.21.2-150000.1.9.1SUSE-SU-2023:4017-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.201.20.9-150000.1.26.1SUSE-SU-2023:4018-1
openSUSELeap 15.4, Leap 15.5go1.20-openssl1.20.11.1-150000.1.14.1SUSE-SU-2023:4472-1
openSUSELeap 15.4, Leap 15.5go1.211.21.2-150000.1.9.1SUSE-SU-2023:4017-1
openSUSELeap 15.4, Leap 15.5go1.21-openssl1.21.4.1-150000.1.5.1SUSE-SU-2023:4469-1
openSUSETumbleweedgo1.201.20.9-1.1openSUSE-SU-2024:13306-1
openSUSETumbleweedgo1.211.21.2-1.1openSUSE-SU-2024:13307-1
Alpinev3.18go1.20.9-r0ALPINE-CVE-2023-39323
Alpinev3.19, v3.20, v3.21 and 3 morego1.21.2-r0ALPINE-CVE-2023-39323
Azure Linux2golang1.20.10-1AZL-31107
Azure Linux2golang1.21.6-1AZL-37358 AZL-37389
Azure Linux3golangno fix listedAZL-78984 AZL-98871
Azure Linux3golang1.20.10-1AZL-52845
Alpaquita23go1.21.7-r0BELL-CVE-2023-39323
Alpaquitastreamgo1.21.2-r0BELL-CVE-2023-39323
BellSoft Hardened Containers23go1.21.7-r0BELL-CVE-2023-39323
BellSoft Hardened Containersstreamgo1.21.2-r0BELL-CVE-2023-39323

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This attack requires knowledge of the absolute path to the file containing the malicious directive, which significantly limits its feasibility for external attackers unless they already have local access or detailed knowledge of the system's layout. To exploit the vulnerability, an attacker must also convince a developer to download and build a malicious Go module—an action typically constrained by trusted workflows and package verification.

Importantly, this vulnerability does not impact running applications. Instead, it targets the development process, specifically developers or CI/CD pipelines during the build phase, further narrowing its scope.

As a result, this issue has been rated Moderate due to the multiple complex and unlikely prerequisites required for a successful exploit.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8go-toolset:rhel8-8090020231013032436.26eb71acFixed 2023-11-14RHBA-2023:6928
Red Hat Enterprise Linux 8go-toolset:rhel8/go-toolset-1.20.10-3Fixed 2023-11-16RHEA-2023:7311
Red Hat Enterprise Linux 8ubi8/go-toolset:1.20.10-3Fixed 2023-11-16RHEA-2023:7311
OpenShift Service Mesh 2openshift-golang-builder-containerNot affected
Red Hat Enterprise Linux 9golangAffected
Red Hat OpenShift Container Platform 4openshift-golang-builder-containerNot affected
Red Hat OpenShift Virtualization 4openshift-golang-builder-containerAffected
Red Hat Storage 3golangWill not fix
Red Hat Storage 3go-toolset-7-golangWill not fix

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-39323.

References

Check your stackJSON