PT-2023-3869 · Go+11 · Go+11
Juho Nurminen
·
Published
2023-05-19
·
Updated
2025-01-06
·
CVE-2023-29404
CVSS v2.0
10
Critical
| 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 the fixed version
Description
The issue is related to the incorrect handling of code generation when processing linker flags from the CgoLDFLAGS directive, allowing a remote attacker to execute arbitrary code. This can occur when running "go get" on a malicious module or when building untrusted code. The vulnerability is triggered by linker flags specified via a "#cgo LDFLAGS" directive, where non-optional flag arguments are incorrectly considered optional, enabling disallowed flags to bypass LDFLAGS sanitization. This affects both the gc and gccgo compilers.
Recommendations
For Go versions prior to the fixed version, update to the latest version to resolve the issue.
As a temporary workaround, consider restricting the use of the "#cgo LDFLAGS" directive to minimize the risk of exploitation.
Avoid using the
LDFLAGS variable in the affected API endpoint until the issue is resolved.
At the moment, there is no information about a newer version that contains a fix for this vulnerability.Exploit
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
Almalinux
Astra Linux
Centos
Debian
Go
Linuxmint
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu