CVE-2026-97040 (GCVE-0-2026-97040)

Vulnerability from cvelistv5 – Published: 2026-11-11 03:13 – Updated: 2026-11-11 03:13
VLAI
Title
Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link
Summary
Building a package containing a crafted ".syso" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading ".syso" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A ".syso" file beginning with a "go object" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as "cgo_ldflag" or "cgo_dynamic_linker") embedded in the ".syso" file to be passed to the external linker without validation. Additionally, ".syso" filenames longer than 16 bytes lost their ".syso" extension when truncated in archive headers, and unrecognized ".syso" formats forced external linking in pure-Go builds. The linker now rejects ".syso" files that are not recognized host object formats, and "cmd/go" and "cmd/pack" preserve the ".syso" suffix when truncating long archive member names.
Severity
No CVSS data available.
CWE
  • CWE-94 - Improper Control of Generation of Code ('Code Injection')
Impacted products
Vendor Product Version
Go toolchain cmd/go Affected: 0 , < 1.26.11 (semver)
Affected: 1.27.0-0 , < 1.27.4 (semver)
Create a notification for this product.
Go toolchain cmd/link Affected: 0 , < 1.26.11 (semver)
Affected: 1.27.0-0 , < 1.27.4 (semver)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "collectionURL": "https://pkg.go.dev",
          "defaultStatus": "unaffected",
          "packageName": "cmd/go",
          "product": "cmd/go",
          "vendor": "Go toolchain",
          "versions": [
            {
              "lessThan": "1.26.11",
              "status": "affected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThan": "1.27.4",
              "status": "affected",
              "version": "1.27.0-0",
              "versionType": "semver"
            }
          ]
        },
        {
          "collectionURL": "https://pkg.go.dev",
          "defaultStatus": "unaffected",
          "packageName": "cmd/link",
          "product": "cmd/link",
          "vendor": "Go toolchain",
          "versions": [
            {
              "lessThan": "1.26.11",
              "status": "affected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThan": "1.27.4",
              "status": "affected",
              "version": "1.27.0-0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "RyotaK (https://ryotak.net) of GMO Flatt Security Inc."
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "Building a package containing a crafted \".syso\" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading \".syso\" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A \".syso\" file beginning with a \"go object\" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as \"cgo_ldflag\" or \"cgo_dynamic_linker\") embedded in the \".syso\" file to be passed to the external linker without validation. Additionally, \".syso\" filenames longer than 16 bytes lost their \".syso\" extension when truncated in archive headers, and unrecognized \".syso\" formats forced external linking in pure-Go builds. The linker now rejects \".syso\" files that are not recognized host object formats, and \"cmd/go\" and \"cmd/pack\" preserve the \".syso\" suffix when truncating long archive member names."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "description": "CWE-94: Improper Control of Generation of Code (\u0027Code Injection\u0027)",
              "lang": "en"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-11T03:13:15.477Z",
        "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "shortName": "Go"
      },
      "references": [
        {
          "url": "https://go.dev/cl/862153"
        },
        {
          "url": "https://go.dev/issue/82570"
        },
        {
          "url": "https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"
        },
        {
          "url": "https://pkg.go.dev/vuln/GO-2026-6851"
        }
      ],
      "title": "Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
    "assignerShortName": "Go",
    "cveId": "CVE-2026-97040",
    "datePublished": "2026-11-11T03:13:15.477Z",
    "dateReserved": "2026-09-23T23:05:04.987Z",
    "dateUpdated": "2026-11-11T03:13:15.477Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-97040",
      "date": "2026-11-16",
      "epss": "0.00246",
      "percentile": "0.15949"
    },
    "microsoft_vex": {
      "current_release_date": "2026-11-14T01:17:42.000Z",
      "cve": "CVE-2026-97040",
      "id": "msrc_CVE-2026-97040",
      "initial_release_date": "2026-11-13T01:06:37.000Z",
      "product_status:known_affected": "7",
      "product_status:known_not_affected": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "Cgo directive injection via .syso files disguised as Go object files in cmd/go and cmd/link",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-97040.json",
      "version": "3"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "collectionURL": "https://pkg.go.dev",
                "defaultStatus": "unaffected",
                "packageName": "cmd/go",
                "product": "cmd/go",
                "vendor": "Go toolchain",
                "versions": [
                  {
                    "lessThan": "1.26.11",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "1.27.4",
                    "status": "affected",
                    "version": "1.27.0-0",
                    "versionType": "semver"
                  }
                ]
              },
              {
                "collectionURL": "https://pkg.go.dev",
                "defaultStatus": "unaffected",
                "packageName": "cmd/link",
                "product": "cmd/link",
                "vendor": "Go toolchain",
                "versions": [
                  {
                    "lessThan": "1.26.11",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "1.27.4",
                    "status": "affected",
                    "version": "1.27.0-0",
                    "versionType": "semver"
                  }
                ]
              }
            ],
            "source": "security@golang.org"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "Building a package containing a crafted \".syso\" file could bypass cgo flag validation and inject arbitrary linker flags when linking. When loading \".syso\" entries from a package archive, the linker only checked for recognized host object headers (ELF, Mach-O, PE, and XCOFF) before falling through to Go object parsing. A \".syso\" file beginning with a \"go object\" header was parsed as a Go compiler object, allowing untrusted cgo metadata directives (such as \"cgo_ldflag\" or \"cgo_dynamic_linker\") embedded in the \".syso\" file to be passed to the external linker without validation. Additionally, \".syso\" filenames longer than 16 bytes lost their \".syso\" extension when truncated in archive headers, and unrecognized \".syso\" formats forced external linking in pure-Go builds. The linker now rejects \".syso\" files that are not recognized host object formats, and \"cmd/go\" and \"cmd/pack\" preserve the \".syso\" suffix when truncating long archive member names."
          }
        ],
        "id": "CVE-2026-97040",
        "lastModified": "2026-11-12T22:09:39.233",
        "metrics": {},
        "published": "2026-11-11T05:19:58.283",
        "references": [
          {
            "source": "security@golang.org",
            "url": "https://go.dev/cl/862153"
          },
          {
            "source": "security@golang.org",
            "url": "https://go.dev/issue/82570"
          },
          {
            "source": "security@golang.org",
            "url": "https://groups.google.com/g/golang-announce/c/iY8TY0wWgbM"
          },
          {
            "source": "security@golang.org",
            "url": "https://pkg.go.dev/vuln/GO-2026-6851"
          }
        ],
        "sourceIdentifier": "security@golang.org",
        "vulnStatus": "Awaiting Analysis"
      }
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-11-14T01:10:01Z",
      "cve": "CVE-2026-97040",
      "id": "CVE-2026-97040",
      "initial_release_date": "2026-11-11T17:56:25Z",
      "product_status:known_affected": "207",
      "product_status:known_not_affected": "214",
      "product_status:recommended": "96",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-97040",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2026/cve-2026-97040.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…