{"id":"CVE-2026-97033","aliases":["GO-2026-6858"],"title":"Unexpected code execution via --sysroot, -target, -isysroot, -Wl,-syslibroot, and -x cgo flags in cmd/go","titleSource":"Go","descriptionSource":"OSV","description":"Building a malicious package that uses cgo could cause arbitrary code execution at build time through several compiler and linker flags permitted in \"#cgo\" directives.\n\nSpecifically, \"--sysroot\" in GCC and Clang relocates compiler subprograms, spec files, and CRT startup objects to an attacker-controlled directory; \"-target\" in Clang falls back to executing target helper tools from the current working directory when not found in PATH; \"-isysroot\" and \"-Wl,-syslibroot\" can pass a regular file on disk to GNU ld.bfd, which interprets it as a positional linker script; and \"-x\" permitted specifying arbitrary compiler input languages beyond those supported by cgo.\n\n\"--sysroot\" and \"-target\" are now disallowed in \"#cgo\" flags, \"-isysroot\" and \"-Wl,-syslibroot\" are verified not to point to regular files, and \"-x\" is restricted to the C, C++, Objective-C, and assembler languages supported by cgo.","severity":"unknown","score":null,"published":"2026-11-11T02:51:11.000Z","modified":"2026-11-11T03:15:14.803Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Go","name":"toolchain","sources":[{"name":"OSV · GO-2026-6858","url":"https://osv.dev/vulnerability/GO-2026-6858"}],"ranges":[{"events":[{"introduced":"0"},{"fixed":"1.26.11"},{"introduced":"1.27.0-0"},{"fixed":"1.27.4"}],"type":"SEMVER"}],"versions":[],"fixed":["1.26.11","1.27.4"]}],"sourceAffected":[],"references":["https://go.dev/cl/862146","https://go.dev/issue/82577","https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","https://pkg.go.dev/vuln/GO-2026-6858"],"sources":[{"name":"CVE","id":"CVE-2026-97033","modified":"2026-11-11T03:13:17.601Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-97033"},{"name":"OSV","id":"GO-2026-6858","modified":"2026-11-11T03:15:14.803158957Z","url":"https://osv.dev/vulnerability/GO-2026-6858"}],"assessments":[],"cve":{"records":[{"id":"CVE-2026-97033","source":"Go","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-09-23T23:04:33.594Z","published":"2026-11-11T03:13:17.601Z","modified":"2026-11-11T03:13:17.601Z"}],"publishers":[{"name":"Go","role":"CNA","organizationId":"1bb62c36-49e3-4200-9d77-64a1400537cc","modified":"2026-11-11T03:13:17.601Z"}],"references":[{"url":"https://go.dev/cl/862146","tags":[],"source":"Go"},{"url":"https://go.dev/issue/82577","tags":[],"source":"Go"},{"url":"https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM","tags":[],"source":"Go"},{"url":"https://pkg.go.dev/vuln/GO-2026-6858","tags":[],"source":"Go"}],"weaknesses":[],"applicability":[],"prioritization":[]},"products":[{"vendor":"Go toolchain","name":"cmd/go","platforms":[],"versions":[{"version":"0","status":"affected","lessThan":"1.26.11","versionType":"semver"},{"version":"1.27.0-0","status":"affected","lessThan":"1.27.4","versionType":"semver"}],"defaultStatus":"unaffected","cpes":[],"source":"Go","url":"https://www.cve.org/CVERecord?id=CVE-2026-97033"}],"remediation":[],"observedAt":"2026-11-11T06:55:58.574Z","kev":{"status":"not-listed","checkedAt":"2026-11-14T23:35:33.875Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-11T07:30:40.059Z","attemptedAt":"2026-11-11T07:30:40.059Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-11T07:30:40.159Z","attemptedAt":"2026-11-11T07:30:40.159Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-11T07:30:40.748Z","attemptedAt":"2026-11-11T07:30:40.748Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-11T07:30:39.040Z","attemptedAt":"2026-11-11T07:30:39.040Z"}],"evidence":[{"source":"NVD","id":"CVE-2026-97033","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97033","modified":"2026-11-11T05:19:57.253","checkedAt":"2026-11-11T07:30:40.059Z"},{"source":"GitHub Advisory Database","id":"GHSA-428h-9j26-5fcf","url":"https://github.com/advisories/GHSA-428h-9j26-5fcf","modified":"2026-11-11T06:32:47Z","checkedAt":"2026-11-11T07:30:40.159Z"},{"source":"ENISA EUVD","id":"EUVD-2026-123112","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-123112","modified":"Nov 11, 2026, 6:32:38 AM","checkedAt":"2026-11-11T07:30:40.748Z"}],"aiSummary":null}