#VU89295 Untrusted search path in Go programming language


Vulnerability identifier: #VU89295

Vulnerability risk: Medium

CVSSv3.1: 6.5 [CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C]

CVE-ID: CVE-2024-24787

CWE-ID: CWE-426

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
Go programming language
Universal components / Libraries / Scripting languages

Vendor: Google

Description

The vulnerability allows a remote attacker to compromise the affected system.

The vulnerability exists due to usage of an untrusted search path in md/go. A remote attacker can trick the victim to build a Go module which contains CGO to trigger arbitrary code execution when using the Apple version of ld, due to usage of the -lto_library flag in a "#cgo LDFLAGS" directive.


Mitigation
Install updates from vendor's website.

Vulnerable software versions

Go programming language: 1.0 - 1.0.3, 1.1 - 1.19.13, 1.2 - 1.22.2, 1.3 - 1.3.3, 1.4 - 1.4.3, 1.5 - 1.5.4, 1.6 - 1.6.4, 1.7 - 1.7.6, 1.8 - 1.8.7, 1.9 - 1.9.7


External links
http://go.dev/issue/67119
http://go.dev/cl/583815
http://groups.google.com/g/golang-announce/c/wkkO4P9stm0
http://pkg.go.dev/vuln/GO-2024-2825


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.


Latest bulletins with this vulnerability