{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "1.32.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6"
            },
            {
              "fixed": "3639d3825c30d35bb303a4380248f82ac6b84e51"
            }
          ],
          "repo": "https://github.com/microsoft/kiota",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-xg2h-5xr2-29jw"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59861.json"
  },
  "details": "Kiota is an OpenAPI based HTTP Client code generator. Prior to 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.32.0.",
  "id": "CVE-2026-59861",
  "modified": "2026-07-18T03:41:43.063704250Z",
  "published": "2026-07-16T14:36:32.010Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/microsoft/kiota/releases/tag/v1.32.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59861.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/microsoft/kiota/security/advisories/GHSA-xg2h-5xr2-29jw"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59861"
    },
    {
      "type": "FIX",
      "url": "https://github.com/microsoft/kiota/commit/fee1b648bb4394ba7ba72de9c0ce4f2a0bad0cb6"
    },
    {
      "type": "FIX",
      "url": "https://github.com/microsoft/kiota/pull/7746"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Kiota: Code Generation Literal Injection in Kiota Ruby Generator"
}