VDB

CVE-2023-39323

CVE-2023-39323 PUBLISHED CVSS 8.1 HIGH

Arbitrary code execution during build via line directives in cmd/go

Reported by go · Published October 5, 2023

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
cmd/goGo Modules1.21.2, 1.20.9
toolchainGo Modules1.21.2, 1.20.9
smarter-device-manager-fipsChainguard1.20.11-r2
golangAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1
golang-testsAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1
golang-sharedAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1
goAlpine1.21.2-r0, 1.20.9-r0
kubeflow-katibWolfi0.19.0-r40, 0.19.0-r31
golang-miscAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1
golang-binAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1
kindWolfi0.21.0-r0
golang-docsAmazon Linux1.20.10-1.amzn2023.0.1, 1.20.10-1.amzn2.0.1

12 more packages have a fixed version. See every fix in Lookup.

Risk scores

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

Affected products

VendorProductVersions
Go toolchaincmd/go0, 1.21.0-0
chainguardsmarter-device-manager-fips0
Go toolchaincmd/go1.21.0-0, 0
amazon:2golang0
amazon:2023golang-tests0
amazon:2golang-tests0
amazon:2023golang0
amazon:2023golang-shared0
alpinego0, 0
wolfikubeflow-katib0, 0
amazon:2023golang-misc0
amazon:2golang-bin0
wolfikind0
amazon:2golang-docs0
amazon:2023golang-docs0
amazon:2golang-src0
wolfifalco0
chainguardfalco0
wolfimetrics-server0
amazon:2023golang-src0

…and 8 more

Timeline

  • Sep 28, 2023 CVE Published
  • Oct 6, 2023 EPSS Score (30 in total, the first dated here)
  • Feb 8, 2026 Security Advisory (6 in total, the first dated here)
  • Mar 26, 2026 Distribution Patch (3 in total, the first dated here)
  • Aug 5, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-39323
vulnetix vdb fixes CVE-2023-39323

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-39323/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›