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

exploitDog

redhat логотип

CVE-2023-39323

Опубликовано: 05 окт. 2023
Источник: redhat
CVSS3: 8.1
EPSS Низкий

Описание

Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

A flaw was found in the golang cmd/go standard library. A line directive ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to pass during compilation. This can result in the unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

Отчет

This attack requires knowledge of the absolute path to the file containing the malicious directive, which significantly limits its feasibility for external attackers unless they already have local access or detailed knowledge of the system's layout. To exploit the vulnerability, an attacker must also convince a developer to download and build a malicious Go module—an action typically constrained by trusted workflows and package verification. Importantly, this vulnerability does not impact running applications. Instead, it targets the development process, specifically developers or CI/CD pipelines during the build phase, further narrowing its scope. As a result, this issue has been rated Moderate due to the multiple complex and unlikely prerequisites required for a successful exploit.

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

ПлатформаПакетСостояниеРекомендацияРелиз
OpenShift Service Mesh 2openshift-golang-builder-containerNot affected
Red Hat Enterprise Linux 9golangAffected
Red Hat OpenShift Container Platform 4openshift-golang-builder-containerNot affected
Red Hat OpenShift Virtualization 4openshift-golang-builder-containerAffected
Red Hat Storage 3golangWill not fix
Red Hat Storage 3go-toolset-7-golangWill not fix
Red Hat Enterprise Linux 8go-toolsetFixedRHBA-2023:692814.11.2023
Red Hat Enterprise Linux 8go-toolsetFixedRHEA-2023:731116.11.2023
Red Hat Enterprise Linux 8ubi8/go-toolsetFixedRHEA-2023:731116.11.2023

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

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

Статус:

Moderate
Дефект:
CWE-94
https://bugzilla.redhat.com/show_bug.cgi?id=2242544golang: cmd/go: line directives allows arbitrary execution during build

EPSS

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

8.1 High

CVSS3

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

CVSS3: 8.1
ubuntu
больше 2 лет назад

Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

CVSS3: 8.1
nvd
больше 2 лет назад

Line directives ("//line") can be used to bypass the restrictions on "//go:cgo_" directives, allowing blocked linker and compiler flags to be passed during compilation. This can result in unexpected execution of arbitrary code when running "go build". The line directive requires the absolute path of the file in which the directive lives, which makes exploiting this issue significantly more complex.

CVSS3: 8.1
msrc
7 месяцев назад

Arbitrary code execution during build via line directives in cmd/go

CVSS3: 8.1
debian
больше 2 лет назад

Line directives ("//line") can be used to bypass the restrictions on " ...

suse-cvrf
больше 2 лет назад

Security update for go1.20

EPSS

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

8.1 High

CVSS3