Alpine: multiple go packages: security update to 1.27.4-r0

critical Tenable Cloud Security Plugin ID 499225

Description

There are packages installed that are affected by multiple vulnerabilities referenced in the following CVEs:

- Building a malicious package that uses cgo could cause arbitrary code execution at build time through
several compiler and linker flags permitted in "#cgo" directives. Specifically, "--sysroot" in GCC and
Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled
directory; "-target" in Clang falls back to executing target helper tools from the current working
directory when not found in PATH; "-isysroot" and "-Wl,-syslibroot" can pass a regular file on disk to GNU
ld.bfd, which interprets it as a positional linker script; and "-x" permitted specifying arbitrary
compiler input languages beyond those supported by cgo. "--sysroot" and "-target" are now disallowed in
"#cgo" flags, "-isysroot" and "-Wl,-syslibroot" are verified not to point to regular files, and "-x" is
restricted to the C, C++, Objective-C, and assembler languages supported by cgo. (CVE-2026-97033)

- Building a malicious package that uses cgo could bypass "#cgo LDFLAGS" validation and cause unexpected
code execution at build time, or cause the go command to panic, via crafted quoting in "//go:cgo_ldflag"
directives. When "cmd/cgo" generates "_cgo_gotypes.go", it quotes each "#cgo LDFLAGS" argument with
strconv.Quote in a "//go:cgo_ldflag" directive, but "cmd/compile" and "cmd/go" parsed those directives by
splitting on raw quote characters without handling backslash escapes or unquoting the string. This
mismatch allowed disallowed linker flags or unvalidated linker search paths to be smuggled past the go
command's flag checks and passed to the external linker. In addition, deduplicating LDFLAGS in the go
command could panic with an out-of-bounds slice index when a prefix of the flag list matched near the end
of the slice. "cmd/compile" and "cmd/go" now properly handle backslash-escaped quotes and unquote
"//go:cgo_*" pragma strings with strconv.Unquote, and the slice bounds check in processCgoOutputs has been
fixed. (CVE-2026-97043)

- Building a malicious package that uses "//go:cgo_import_dynamic" or links against a crafted PE object on
Windows could pass unsafe library arguments to the external linker. The compiler only checked the first
character of the library name in "//go:cgo_import_dynamic" directives and skipped validation in cgo-
generated files. In addition, on Windows, "cmd/cgo" and "cmd/link" did not validate imported DLL names
extracted from PE object files before emitting "-l<name>" flags for the external linker, allowing a
crafted DLL name containing ".." path traversal or special characters to reference arbitrary files on
disk. The compiler now validates every character of the library name in "//go:cgo_import_dynamic"
directives (including in cgo-generated files on Windows) and rejects ".." path traversal, and "cmd/cgo"
and "cmd/link" reject PE imported DLL names containing path separators, "..", ":", or leading "-" or "@".
(CVE-2026-97042)

- Building a malicious package that uses "#cgo pkg-config:" directives could load untrusted pkg-config ".pc"
files or inject unvalidated compiler and linker flags. The pkg-config flag allowlist previously permitted
"--with-path=" and "--personality=", allowed "--define-variable=" values beginning with "=" or "$" (which
can rewrite paths in system ".pc" files into sysroot-prefixed "-L=" or "-L$SYSROOT" linker search paths),
and allowed package arguments ending in ".pc" or containing path separators or "..", which caused pkg-
config to load local ".pc" files directly from the package directory. In addition, flags returned by "pkg-
config --cflags" in cgoCPPFLAGS were not checked when determining whether internal linking is safe. The go
command now disallows "--with-path=", "--personality=", leading "=" or "$" characters in "--define-
variable=" values, and local ".pc" paths in "#cgo pkg-config:" directives, and inspects cgoCPPFLAGS when
checking internal linking compatibility. (CVE-2026-97039)

Solution

Update the go library and its related packages to version 1.27.4-r0 or later.

See Also

https://security.alpinelinux.org/vuln/CVE-2026-97033

https://security.alpinelinux.org/vuln/CVE-2026-97034

https://security.alpinelinux.org/vuln/CVE-2026-97035

https://security.alpinelinux.org/vuln/CVE-2026-97037

https://security.alpinelinux.org/vuln/CVE-2026-97038

https://security.alpinelinux.org/vuln/CVE-2026-97039

https://security.alpinelinux.org/vuln/CVE-2026-97040

https://security.alpinelinux.org/vuln/CVE-2026-97041

https://security.alpinelinux.org/vuln/CVE-2026-97042

https://security.alpinelinux.org/vuln/CVE-2026-97043

https://security.alpinelinux.org/vuln/CVE-2026-97054

Plugin Details

Severity: Critical

ID: 499225

Version: Revision 1.1

Type: Local

Published: 12/4/2026

Updated: 12/4/2026

Supported Sensors: Agentless Assessment

Risk Information

VPR

Risk Factor: Medium

Score: 4.9

Percentile: 58.54

CVSS v2

Risk Factor: Medium

Base Score: 4.4

Temporal Score: 3.3

Vector: CVSS2#AV:L/AC:M/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2026-97033

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

CVSS Score Source: CVE-2026-97040

Vulnerability Information

Exploit Ease: No known exploits are available

Vulnerability Publication Date: 11/11/2026

Reference Information

CVE: CVE-2026-97033, CVE-2026-97034, CVE-2026-97035, CVE-2026-97037, CVE-2026-97038, CVE-2026-97039, CVE-2026-97040, CVE-2026-97041, CVE-2026-97042, CVE-2026-97043, CVE-2026-97054

IAVB: 2026-B-0332