{"id":"CVE-2026-97039","published":"2026-11-11T03:13:15Z","modified":"2026-11-16T17:27:40Z","title":"Flag sanitization bypass via \"#cgo pkg-config:\" directives in cmd/go","vendor":"Go toolchain","product":"cmd/go","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.3,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00488,"percentile":0.42842,"provenance":"source"},"cwes":[{"id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"}],"references":[{"url":"https://go.dev/cl/862152","tags":[]},{"url":"https://go.dev/issue/82571","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2026-6852","tags":[]}],"priority":{"score":14.4,"factors":[{"name":"EPSS percentile","points":8.57},{"name":"CVSS severity","points":5.81}]},"vendorSlug":"go-toolchain","affectedVersions":[{"vendor":"Go toolchain","product":"cmd/go","versions":["< 1.26.11",">= 1.27.0-0, < 1.27.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-11-16T17:27:36.966788Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"toolchain","vulnerableRanges":["<1.26.11",">=1.27.0-0, <1.27.4"],"patched":["1.26.11","1.27.4"],"from":["GO-2026-6852"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-123106","exploited":false,"provenance":"source"}}