PT-2023-6473 · Go+7 · Go+7
Rolandshoemaker
·
Published
2023-05-10
·
Updated
2025-06-12
·
CVE-2023-39323
CVSS v2.0
10
High
| Vector | AV:N/AC:L/Au:N/C:C/I:C/A:C |
Name of the Vulnerable Software and Affected Versions
Go versions prior to 1.21.2
Go versions prior to 1.20.9
Description
The issue is related to the "//line" directive in the Go programming language, which can be exploited to bypass restrictions on "//go:cgo " directives. This allows blocked linker and compiler flags to be passed during compilation, potentially resulting in the unexpected execution of arbitrary code when running "go build". The exploitation of this issue is complex due to the requirement for the absolute path of the file in which the directive lives.
Recommendations
For Go versions prior to 1.21.2, update to version 1.21.2 or later to resolve the issue.
For Go versions prior to 1.20.9, update to version 1.20.9 or later to resolve the issue.
As a temporary workaround, consider restricting the use of the "//line" directive until a patch is available.
Exploit
Fix
Code Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Alt Linux
Astra Linux
Debian
Go
Linuxmint
Red Os
Suse
Ubuntu