{"vuln_id":"CVE-2026-97039","aliases":[],"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.","published_at":"2026-11-11T05:19:58.133000Z","modified_at":"2026-11-16T18:17:33.960000Z","first_seen_at":"2026-11-21T19:15:48.026765Z","severity":"high","severity_source":"nvd","cvss_score":8.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L","cwe":["CWE-88"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00488,"epss_percentile":0.42854,"nvd_status":"Awaiting Analysis","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-97039"},"matched_alias":null,"items":[{"id":4834,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-97039: Building a malicious package that uses \"#cgo pkg-config:\" directives could load untrusted pkg-config \".pc\" files or inject unvalidated compiler and linker flag…","summary":"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.\n\nReferences:\nhttps://go.dev/cl/862152\nhttps://go.dev/issue/82571\nhttps://groups.google.com/g/golang-announce/c/iY8TY0wWgbM\nhttps://pkg.go.dev/vuln/GO-2026-6852","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97039","published_at":"2026-11-11T05:19:58.133000Z","updated_at":"2026-11-16T18:17:33.960000Z","fetched_at":"2026-11-21T19:15:31.480202Z","severity":"high","cvss_score":8.3,"epss":0.00488,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-97039","vuln_ids":["CVE-2026-97039"],"tags":["CWE-88"],"cluster_id":5143,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/4834","html":"https://vulnwatch.ve1ve2.com/item/4834"}}]}