Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2023-39323

golang: cmd/go: line directives allows arbitrary execution during build

Overview

Published
5 Oct 2023
Modified
17 Jun 2026
High CVE
1 Registry packages
40 OS packages
13 Linux distributions
Yes Fix available

Description

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.

Source: OX vulnerability database

Severity

8.1 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages · 1

Packages affected by CVE-2023-39323
EcosystemPackageVulnerableFixed in
Bitnami golang <1.20.9>=1.21.0, <1.21.2 1.20.91.21.2

Open a package to see all its vulnerabilities.

Operating systems · 47 fixes

Azure Linux 1 release · 1 package

fixed 1
golang
Azure Linux fixes for CVE-2023-39323
ReleasePackageFixed in
3.0 golang 0: 1.20.10-1.azl3

Photon OS 2 releases · 1 package

fixed 2
go
Photon OS fixes for CVE-2023-39323
ReleasePackageFixed in
4.0 go 1.20.10-1.ph4
5.0 go 1.20.10-1.ph5

Red Hat 3 releases · 3 packages

wont fix 1 fixed 2 affected 1
go-toolset-7-golang go-toolset delve
Red Hat fixes for CVE-2023-39323
ReleasePackageFixed inAdvisory
go-toolset-7-golang +6 wont fix —
8 (go-toolset:rhel8) go-toolset +6 0:1.20.10-1.module+el8.9.0+20382+04f7fe80 RHBA-2023:6928
8 (go-toolset:rhel8) delve 0:1.20.2-1.module+el8.9.0+18926+5193682d RHBA-2023:6928
9 go-toolset +7 affected —

SUSE Linux Enterprise 2 releases · 4 packages

fixed 8
go1-20-openssl go1-20 go1-21 go1-21-openssl
SUSE Linux Enterprise fixes for CVE-2023-39323
ReleasePackageFixed inAdvisory
15.4 go1-20-openssl +2 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
15.4 go1-20 +2 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1
15.4 go1-21 +2 1.21.2-150000.1.9.1 SUSE-SU-2023:4017-1
15.4 go1-21-openssl +2 1.21.4.1-150000.1.5.1 SUSE-SU-2023:4469-1
15.5 go1-20-openssl +2 1.20.11.1-150000.1.14.1 SUSE-SU-2023:4472-1
15.5 go1-20 +2 1.20.9-150000.1.26.1 SUSE-SU-2023:4018-1

2 more rows

alpine 4 releases · 1 package

fixed 4
go
alpine fixes for CVE-2023-39323
ReleasePackageFixed in
3.22 go 1.21.2-r0
3.23 go 1.21.2-r0
3.24 go 1.21.2-r0
edge go 1.21.2-r0

amazon linux 1 release · 2 packages

fixed 2
golang ecs-service-connect-agent
amazon linux fixes for CVE-2023-39323
ReleasePackageFixed in
2023 golang +6 1.20.10-1.amzn2023.0.1
2023 ecs-service-connect-agent v1.27.2.0-1.amzn2023

chainguard 1 release · 5 packages

fixed 5
configmap-reload-fips kubeflow-katib kind metrics-server smarter-device-manager-fips
chainguard fixes for CVE-2023-39323
ReleasePackageFixed in
configmap-reload-fips 0.12.0-r2
kubeflow-katib 0.19.0-r40
kind 0.21.0-r0
metrics-server 0.6.4-r2
smarter-device-manager-fips 1.20.11-r2

debian 3 releases · 3 packages

affected 3
golang-1-11 golang-1-15 golang-1-19
debian fixes for CVE-2023-39323
ReleasePackageFixed in
10 golang-1-11 affected
11 golang-1-15 affected
12 golang-1-19 affected

echo 1 release · 1 package

affected 1
golang-1-19
echo fixes for CVE-2023-39323
ReleasePackageFixed in
golang-1-19 affected

openSUSE 1 release · 2 packages

fixed 2
go1-20 go1-21
openSUSE fixes for CVE-2023-39323
ReleasePackageFixed inAdvisory
Tumbleweed go1-20 +3 1.20.9-1.1 openSUSE-SU-2024:13306-1
Tumbleweed go1-21 +3 1.21.2-1.1 openSUSE-SU-2024:13307-1

root.io debian 1 release · 1 package

affected 1
rootio-golang-1-19
root.io debian fixes for CVE-2023-39323
ReleasePackageFixed in
12 rootio-golang-1-19 affected

ubuntu 4 releases · 4 packages

fixed 11
golang-1-18 golang-1-20 golang-1-21 golang-1-17
ubuntu fixes for CVE-2023-39323
ReleasePackageFixed in
18.04-ESM golang-1-18 1.18.1-1ubuntu1~18.04.4+esm1
20.04 golang-1-18 1.18.1-1ubuntu1~20.04.3
20.04 golang-1-20 1.20.3-1ubuntu0.1~20.04.1
20.04 golang-1-21 1.21.1-1~ubuntu20.04.2
20.04-ESM golang-1-18 1.18.1-1ubuntu1~20.04.3
20.04-ESM golang-1-20 1.20.3-1ubuntu0.1~20.04.1

5 more rows

wolfi 1 release · 3 packages

fixed 3
kubeflow-katib kind metrics-server
wolfi fixes for CVE-2023-39323
ReleasePackageFixed in
kubeflow-katib 0.19.0-r40
kind 0.21.0-r0
metrics-server 0.6.4-r2

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.