CVE-2024-24787
MEDIUMGo cmd/go 1.21.10 and 1.22.0-1.22.3 - Code Execution via CGO LDFLAGS
Title source: manualExploitation Summary
EIP tracks 1 public exploit for CVE-2024-24787. PoCs published by LOURC0D3.
AI-analyzed exploit summary This PoC demonstrates CVE-2024-24787, where a Go module with CGO can trigger arbitrary code execution on Darwin systems by exploiting the -lto_library flag in a #cgo LDFLAGS directive. The malicious.dylib is loaded during the build process, leading to RCE.
Description
On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to usage of the -lto_library flag in a "#cgo LDFLAGS" directive.
Exploits (1)
This PoC demonstrates CVE-2024-24787, where a Go module with CGO can trigger arbitrary code execution on Darwin systems by exploiting the -lto_library flag in a #cgo LDFLAGS directive. The malicious.dylib is loaded during the build process, leading to RCE.
References (6)
Scores
CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H