{
  "id": "CVE-2025-61731",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-61731",
  "published_at": "2026-01-28T19:30:30.844Z",
  "title": "Arbitrary file write using cgo pkg-config directive in cmd/go",
  "vendor": "Go toolchain",
  "product": "cmd/go",
  "cvss": {
    "score": 7.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/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 file with cmd/go can cause can cause a write to an attacker-controlled file with partial control of the file content. The \"#cgo pkg-config:\" directive in a Go source file provides command-line arguments to provide to the Go pkg-config command. An attacker can provide a \"--log-file\" argument to this directive, causing pkg-config to write to an attacker-controlled location.",
  "cwe": "CWE-78",
  "cpes": [
    "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Go toolchain",
        "product": "cmd/go",
        "ranges": [
          "\u003c 1.24.12",
          "\u003e= 1.25.0, \u003c 1.25.6"
        ],
        "fixed_in": [
          "1.24.12",
          "1.25.6"
        ]
      }
    ],
    "upgrade": [
      "Upgrade cmd/go to 1.24.12 or 1.25.6 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
