Skip to content
Threat Brief

← All advisories

CVE-2026-97039

High 8.3No known exploitationFix available

Flag sanitization bypass via "#cgo pkg-config:" directives in cmd/go

Record last updated

CVSS score

8.3

High on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 33% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

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.

Weakness: CWE-88

Patching and mitigation

Patch status
Fix available (source: Microsoft MSRC)
Fix documented (source date)
Mitigation
None documented
Vendor guidance
msrc.microsoft.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
Microsoftazl3 golang 1.26.10-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.26.11-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.27.3-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl3 golang 1.27.4-1 on Azure Linux 3.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl4 cross-gcc 15.2.1-1.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl4 gcc 15.3.1-2.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC
Microsoftazl4 golang 1.26.10-3.azl4 on Azure Linux 4.0Not documentedNot documentedMicrosoft MSRC

Timeline

  1. Advisory

    Microsoft advisory published

    Source: Microsoft MSRC (opens in a new tab)

  2. Advisory change

    Microsoft advisory revised (2.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  3. Advisory change

    Microsoft advisory revised (3.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  4. Advisory change

    Microsoft advisory revised (4.0): Information published.

    Source: Microsoft MSRC (opens in a new tab)

  5. Patch

    Fix documented by Microsoft MSRC

    Source: Microsoft MSRC (opens in a new tab)

Vendor guidance and references