Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-97041

Опубликовано: 11 нояб. 2026
Источник: redhat
CVSS3: 7.8
EPSS Низкий

Описание

Building a malicious package containing "//go:cgo_" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=", and "cgo_import_dynamic" no longer overwrites symbols exported via "cgo_export_dynamic" or "cgo_export_static".

A flaw was found in the Go compiler and linker. This vulnerability allows an attacker to achieve arbitrary code execution on systems building Go software by injecting unauthorized flags into the external linker. The issue occurs on Executable and Linkable Format (ELF) platforms because the compiler and linker fail to properly validate special compiler directives embedded within Go source files. A remote attacker can exploit this flaw by tricking a user or automated pipeline into compiling a malicious Go package, leading to the compromise of the build host.

Отчет

This vulnerability is rated as having Moderate severity because it requires a user or build pipeline to compile untrusted Go source code, preventing direct remote exploitation against deployed services. In typical Red Hat environments, production deployments that run previously compiled binaries remain unaffected, restricting the attack surface to systems where untrusted third-party packages or dependencies are actively built. Successful exploitation allows crafted compiler directives within the imported source code to execute commands with the privileges of the user running the compilation toolchain.

Меры по смягчению последствий

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Exploit Intelligenceexploit-intelligence/vulnerability-analysis-rhel9Affected
Migration Toolkit for Applications 8mta/mta-go-external-provider-rhel9Affected
Red Hat Hardened Imagesgolang1.25Will not fix
Red Hat OpenShift Container Platform 4openshift4/ose-operator-sdk-rhel8Affected
Red Hat OpenShift Container Platform 4openshift4/ose-operator-sdk-rhel9Affected
Red Hat OpenShift Dev Spacesdevspaces/udi-rhel9Affected
Red Hat Enterprise Linux 10golangFixedRHSA-2026:10258723.11.2026
Red Hat Enterprise Linux 8go-toolsetFixedRHSA-2026:10259223.11.2026
Red Hat Enterprise Linux 9golangFixedRHSA-2026:10258623.11.2026
Red Hat Hardened Imagesgolang1-27-main-1.27.4-2.hum1FixedRHSA-2026:10123121.11.2026

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-88
https://bugzilla.redhat.com/show_bug.cgi?id=2571447cmd/compile: cmd/link: golang: golang: Arbitrary code execution via external linker flag injection

EPSS

Процентиль: 41%
0.00575
Низкий

7.8 High

CVSS3

Связанные уязвимости

CVSS3: 8.8
ubuntu
16 дней назад

Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,<path>". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=<path>", and "cgo_import_dy...

CVSS3: 8.8
nvd
16 дней назад

Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,<path>". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=<path>", and "cgo_import_dynam

CVSS3: 8.1
msrc
15 дней назад

Host linker flag injection via //go:cgo_* directives in cmd/compile and cmd/link

CVSS3: 8.8
debian
16 дней назад

Building a malicious package containing "//go:cgo_*" compiler directiv ...

CVSS3: 8.8
github
16 дней назад

Building a malicious package containing "//go:cgo_*" compiler directives could inject arbitrary flags into the external linker invocation on ELF platforms. The compiler and linker did not reject commas in "//go:cgo_import_dynamic", "//go:cgo_export_dynamic", "//go:cgo_export_static", "//go:cgo_import_static", and "//go:cgo_dynamic_linker" directives, and the linker passed the dynamic linker path using "-Wl,--dynamic-linker,<path>". Furthermore, the two-argument form of "//go:cgo_import_dynamic" (which is permitted in non-cgo Go source files) could overwrite the external symbol name of a symbol already marked for cgo export. A symbol name or dynamic linker path containing a comma or leading "@" could split "-Wl,--export-dynamic-symbol=" or "-Wl,--dynamic-linker," into arbitrary host linker flags or response file arguments. The compiler and linker now reject commas in "//go:cgo_*" symbol and dynamic linker directives, the linker passes "-Wl,--dynamic-linker=<path>", and "cgo_import_dy...

EPSS

Процентиль: 41%
0.00575
Низкий

7.8 High

CVSS3