CVE-2026-97039

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.

Severity
HIGH
CVSS v3
8.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L · source adp
Exploit chance (EPSS)
0.385%
chance of exploitation in the next 30 days
higher than 33.2% of scored CVEs · 2026-11-18
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationnone
Automatableno
Technical impacttotal
Scored2026-11-16

Timeline

  1. 2026-11-11Published by the CNA03:13 UTC
  2. 2026-11-11Published in NVD05:19 UTC · 2 hours 6 minutes after the CNA
  3. 2026-11-16CISA SSVC decision recorded5 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
go_toolchain cmd/gofrom 0 before 1.26.11fixed in 1.26.11from 1.27.0-0 before 1.27.4fixed in 1.27.41.26.111.27.4

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources