{
  "id": "CVE-2026-97042",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-97042",
  "published_at": "2026-11-11T03:13:15.06Z",
  "title": "Linker flag injection via cgo_import_dynamic and PE DLL names in cmd/cgo, cmd/compile, and cmd/link",
  "vendor": "Go toolchain",
  "product": "cmd/cgo",
  "cvss": {
    "score": 8.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Building a malicious package that uses \"//go:cgo_import_dynamic\" or links against a crafted PE object on Windows could pass unsafe library arguments to the external linker. The compiler only checked the first character of the library name in \"//go:cgo_import_dynamic\" directives and skipped validation in cgo-generated files. In addition, on Windows, \"cmd/cgo\" and \"cmd/link\" did not validate imported DLL names extracted from PE object files before emitting \"-l\u003cname\u003e\" flags for the external linker, allowing a crafted DLL name containing \"..\" path traversal or special characters to reference arbitrary files on disk. The compiler now validates every character of the library name in \"//go:cgo_import_dynamic\" directives (including in cgo-generated files on Windows) and rejects \"..\" path traversal, and \"cmd/cgo\" and \"cmd/link\" reject PE imported DLL names containing path separators, \"..\", \":\", or leading \"-\" or \"@\".",
  "cwe": "CWE-88",
  "cvss_by_source": {
    "cisa-adp": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Go toolchain",
        "product": "cmd/cgo",
        "ranges": [
          "\u003c 1.26.11",
          "\u003e= 1.27.0-0, \u003c 1.27.4"
        ],
        "fixed_in": [
          "1.26.11",
          "1.27.4"
        ]
      },
      {
        "vendor": "Go toolchain",
        "product": "cmd/compile",
        "ranges": [
          "\u003c 1.26.11",
          "\u003e= 1.27.0-0, \u003c 1.27.4"
        ],
        "fixed_in": [
          "1.26.11",
          "1.27.4"
        ]
      },
      {
        "vendor": "Go toolchain",
        "product": "cmd/link",
        "ranges": [
          "\u003c 1.26.11",
          "\u003e= 1.27.0-0, \u003c 1.27.4"
        ],
        "fixed_in": [
          "1.26.11",
          "1.27.4"
        ]
      }
    ],
    "upgrade": [
      "Upgrade cmd/cgo to 1.26.11 or 1.27.4 or later.",
      "Upgrade cmd/compile to 1.26.11 or 1.27.4 or later.",
      "Upgrade cmd/link to 1.26.11 or 1.27.4 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
