Arbitrary code execution during build on darwin via "-l to_library" in cgo in cmd/go

Summary

CVECVE-2026-97036
StatePUBLISHED
AssignerGo
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-11 05:19:57 UTC
Updated2026-11-17 05:18:38 UTC
DescriptionOn Darwin, building a malicious package that uses cgo could cause arbitrary code execution when using the Apple linker due to passing "-l to_library <path>" in a "#cgo LDFLAGS" directive. The Apple linker recombines the separated arguments "-l" and "to_library" into "-lto_library", which loads an arbitrary LTO plugin dynamic library at link time. The go command now disallows "-l" followed by "to_library" in "#cgo LDFLAGS", rejects "-lazy_library", "-lazy_framework", "-load_hidden", "-library", and "-library-path", and checks recombined "-l" arguments against disallowed linker flags and patterns.

Risk And Classification

Primary CVSS: v3.1 8.8 HIGH from ADP

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

EPSS: 0.005410000 probability, percentile 0.460870000 (date 2026-11-17)

Problem Types: CWE-88 | CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | CWE-88 CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')


VersionSourceTypeScoreSeverityVector
3.1ADPDECLARED8.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary8.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Go Toolchain Cmd/go affected 1.26.11 semver darwin
CNA Go Toolchain Cmd/go affected 1.27.0-0 1.27.4 semver darwin

References

ReferenceSourceLinkTags
groups.google.com/g/golang-announce/c/iY8TY0wWgbM [email protected] groups.google.com
go.dev/issue/82574 [email protected] go.dev
pkg.go.dev/vuln/GO-2026-6855 [email protected] pkg.go.dev
go.dev/cl/862149 [email protected] go.dev
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Ali Sherif (https://www.linkedin.com/in/ali-sherif-13812b276/) (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report