{"id":"DHI-ytow-dc7j-ehso-nrmz","summary":"Building a malicious package that uses \"#cgo pkg-config:\" directives could load untrusted pkg-config \".pc\" files or…","details":"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.","modified":"2026-11-18T20:03:33.689899627Z","published":"2026-11-18T19:52:05Z","upstream":["CVE-2026-97039"],"references":[{"type":"ADVISORY","url":"https://scout.docker.com/v/DHI-ytow-dc7j-ehso-nrmz"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97039"},{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2026-97039"},{"type":"ADVISORY","url":"https://alas.aws.amazon.com/AL2/ALAS-2026-4125.html"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97054"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97043"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97042"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97041"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97040"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97039"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97038"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97037"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97035"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97034"},{"type":"ADVISORY","url":"http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-97033"},{"type":"ADVISORY","url":"https://alas.aws.amazon.com/AL2023/ALAS-2026-3475.html"},{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2026-97039"},{"type":"ADVISORY","url":"https://pkg.go.dev/vuln/GO-2026-6852"},{"type":"ADVISORY","url":"https://ubuntu.com/security/CVE-2026-97039"},{"type":"ADVISORY","url":"http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-97039"},{"type":"FIX","url":"https://github.com/golang/go/commit/e7b9584fecd027e03a2abd2be2bbde2a43b5c668"},{"type":"FIX","url":"https://github.com/golang/go/commit/616afe1c2c33babc697ee687e66e25af1aba51ad"},{"type":"WEB","url":"https://github.com/golang/go/issues/82571"}],"affected":[{"package":{"name":"go","ecosystem":"Docker Hardened Images:Alpine:3.24","purl":"pkg:apk/dhi/go"},"versions":["1.26.4-r0","1.26.5-r0","1.27.0-r0","1.27.1-r0","1.27.2-r0","1.27.3-r0","1.27.4-r0"],"database_specific":{"owner_kind":"HSP","source":"https://github.com/docker-hardened-images/advisories/blob/main/dhi/osv/2026/DHI-ytow-dc7j-ehso-nrmz.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L"}]}