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

VectorAV: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

ALSA-2023:3922
ALSA-2023:3923
ALT-PU-2023-2086
ALT-PU-2023-2090
ALT-PU-2023-4099
ALT-PU-2023-4736
ALT-PU-2023-4785
ALT-PU-2023-5492
ALT-PU-2023-7055
AZL-27140
AZL-27150
AZL-37337
AZL-37510
AZL-47146
BDU:2023-04161
BIT-GOLANG-2023-29404
CESA-2023_3922
CVE-2023-29404
GO-2023-1841
MGASA-2023-0227
OESA-2023-1386
OESA-2023-1499
OPENSUSE-SU-2024:12987-1
OPENSUSE-SU-2024:12988-1
RHSA-2023:3920
RHSA-2023:3922
RHSA-2023:3923
RHSA-2023_3922
RHSA-2023_3923
RLSA-2023:3923
SUSE-SU-2023:2525-1
SUSE-SU-2023:2526-1
USN-7061-1
USN-7109-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Debian
Go
Linuxmint
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu