{
  "id": "CVE-2026-59861",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-59861",
  "published_at": "2026-07-16T14:36:32.01Z",
  "title": "Kiota: Code Generation Literal Injection in Kiota Ruby Generator",
  "vendor": "microsoft",
  "product": "kiota",
  "cvss": {
    "score": 7.5,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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": "Kiota is an OpenAPI based HTTP Client code generator. Prior to 1.29.1 and 1.32.0, Kiota's Ruby generator embedded OpenAPI default fields, property names, and other schema-derived strings through CodeMethodWriter.cs and SanitizeForQuotedLiteral() in Writers/StringExtensions.cs into Ruby double-quoted literals without escaping #, allowing attacker-controlled #{expr}, #$var, or #@var interpolation markers to inject arbitrary Ruby code into generated model classes. This issue is fixed in version 1.29.1 and 1.32.0.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cna": 7.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "microsoft",
        "product": "kiota",
        "ranges": [
          "\u003e= 1.30.0, \u003c 1.31.1",
          "\u003c 1.29.1"
        ],
        "fixed_in": [
          "1.31.1",
          "1.29.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade kiota to 1.31.1 or 1.29.1 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/microsoft/kiota/security/advisories/GHSA-xg2h-5xr2-29jw"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/microsoft/kiota/pull/7746"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/microsoft/kiota/releases/tag/v1.32.0"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
