CVE Database
/

CVE-2023-39323

Back to search

CVE-2023-39323

Published: Oct 5, 2023

Modified: Jun 12, 2025

PUBLISHED

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.

VendorProductVersions

Go toolchain

cmd/go

affected
0 - < 1.20.9
affected
1.21.0-0 - < 1.21.2

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now