CVE-2026-97033

Description

A flaw was found in cmd/go. An attacker could achieve arbitrary code execution by enticing a user or automated build pipeline to compile a malicious package that uses cgo, which allows Go packages to call C code. Specially crafted compiler and linker flags permitted in build directives can cause build utilities to execute attacker-controlled programs or scripts during compilation.

Statement

This vulnerability is rated as a Moderate impact because exploitation is restricted to build-time operations and requires an operator or automated CI workflow to compile untrusted Go code. Production systems running Red Hat Enterprise Linux typically deploy pre-compiled binaries and do not invoke the Go compiler, leaving runtime environments unaffected. The risk is constrained to the privileges of the local developer environment or build agent executing the compilation.

Mitigation

Disable cgo support during compilation to prevent processing unsafe compiler and linker directives:

export CGO_ENABLED=0

Caveat: Disabling cgo causes builds of packages that strictly depend on C language bindings to fail. Where cgo is required, execute builds within isolated, unprivileged containers and avoid compiling untrusted third-party Go sources.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.8N/A8.8
Attack VectorLocalN/ANetwork
Attack ComplexityLowN/ALow
Privileges RequiredNoneN/ANone
User InteractionRequiredN/ARequired
ScopeUnchangedN/AUnchanged
ConfidentialityHighN/AHigh
Integrity ImpactHighN/AHigh
Availability ImpactHighN/AHigh

Vector

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

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

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability,Other

Technical Impact: Execute Unauthorized Code or Commands; Alter Execution Logic; Read Application Data; Modify Application Data

If an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer, potentially changing the expected behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences. The attacker could include arguments that allow unintended commands or code to be executed, allow sensitive data to be read or modified, or cause other unintended behavior.

Frequently Asked Questions

Want to get errata notifications? Sign up here.