Skip to content
Heist/ feed
Back to feed
High

Kiota: Code Generation Literal Injection

Type: advisorySources: OSV

Kiota is an OpenAPI based HTTP Client code generator. Versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks (for example: serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission). When malicious values from an OpenAPI description are emitted into generated source without context-appropriate escaping, an attacker can break out of string literals and inject additional code into generated clients. This issue is only practically exploitable when the OpenAPI description used for generation is from an untrusted source, or a normally trusted OpenAPI description has been compromised/tampered with. Only generating from trusted, integrity-protected API descriptions significantly reduces the risk. To remediate the issue, upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients as a precaution. Refreshing generated clients ensures previously generated vulnerable code is replaced with hardened output.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41134
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 19:28 UTC · Revision 1

Source evidence

Kiota: Code Generation Literal Injection

core-osv · Original source

Published 22 Apr 2026, 20:20 UTC

Kiota is an OpenAPI based HTTP Client code generator. Versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks (for example: serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission). When malicious values from an OpenAPI description are emitted into generated source without context-appropriate escaping, an attacker can break out of string literals and inject additional code into generated clients. This issue is only practically exploitable when the OpenAPI description used for generation is from an untrusted source, or a normally trusted OpenAPI description has been compromised/tampered with. Only generating from trusted, integrity-protected API descriptions significantly reduces the risk. To remediate the issue, upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients as a precaution. Refreshing generated clients ensures previously generated vulnerable code is replaced with hardened output.

osv:CVE-2026-41134
Complete source record
{
  "id": "1fd84b3cf27a775235427c50d9f8cd290ef40eee375fa5a914f61c6e39c7adaf",
  "url": "https://osv.dev/vulnerability/CVE-2026-41134",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Kiota: Code Generation Literal Injection",
    "summary": "Kiota is an OpenAPI based HTTP Client code generator. Versions prior to 1.29.1 and 1.31.1 are affected by a code-generation literal injection vulnerability in multiple writer sinks (for example: serialization/deserialization keys, path/query parameter mappings, URL template metadata, enum/property metadata, and default value emission). When malicious values from an OpenAPI description are emitted into generated source without context-appropriate escaping, an attacker can break out of string literals and inject additional code into generated clients. This issue is only practically exploitable when the OpenAPI description used for generation is from an untrusted source, or a normally trusted OpenAPI description has been compromised/tampered with. Only generating from trusted, integrity-protected API descriptions significantly reduces the risk. To remediate the issue, upgrade Kiota to 1.29.1, 1.31.1, or later and regenerate/refresh existing generated clients as a precaution. Refreshing generated clients ensures previously generated vulnerable code is replaced with hardened output.",
    "evidence": "osv:CVE-2026-41134",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-41134",
      "aliases": [
        "CVE-2026-41134",
        "GHSA-2hx3-vp6r-mg3f"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/microsoft/kiota",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "071292ba58e3e2b4e569833ac88b1a7fe4433db7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:microsoft:kiota:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.31.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.29.0",
            "v1.31.0",
            "v1.30.0",
            "v1.27.0",
            "v1.27.0-preview.202506050001",
            "v1.27.0-preview.202505290001",
            "v1.27.0-preview.202505220001",
            "v1.26.1",
            "v1.26.0",
            "v1.25.1-preview.202505010001",
            "v1.25.1-preview.202504240001",
            "v1.25.1-preview.202504170001",
            "v1.25.1-preview.202504100001",
            "v1.25.1",
            "v1.24.3",
            "v1.24.2",
            "v1.24.1",
            "v1.24.0",
            "v1.24.0-preview.202503060001",
            "v1.24.0-preview.202502270001",
            "v1.23.0",
            "v1.23.0-preview.202501310001",
            "v1.22.3",
            "v1.22.2",
            "v1.22.1",
            "v1.22.0",
            "v1.22.0-preview.202412270001",
            "v1.22.0-preview.202412190001",
            "v1.22.0-preview.202412120001",
            "v1.21.0",
            "v1.21.0-preview.202411290004",
            "v1.21.0-preview.202411290003",
            "v1.21.0-preview.202411220001",
            "v1.21.0-preview.202411150001",
            "v1.20.0",
            "v1.20.0-preview.202410240001",
            "v1.20.0-preview.202410180001",
            "v1.19.1",
            "v1.20.0-preview.202410100001",
            "v1.19.0",
            "v1.19.0-preview.202409260001",
            "v1.19.0-preview.202409200002",
            "v1.19.0-preview.202409200001",
            "v1.19.0-preview.202409120001",
            "v1.18.0",
            "v1.18.0-preview.202408290001",
            "v1.18.0-preview.202408220001",
            "v1.18.0-preview.202408150001",
            "v1.17.0",
            "v1.17.0-preview.202408010001",
            "v1.16.0",
            "v1.16.0-preview.202406270001",
            "v1.16.0-preview.202406210001",
            "v1.16.0-preview.202406130001",
            "v1.15.0",
            "v1.15.0-preview.202405310001",
            "v1.15.0-preview.202405230001",
            "v1.15.0-preview.202405160001",
            "v1.15.0-preview.202405090001",
            "v1.14.0",
            "v1.14.0-preview.202404250001",
            "v1.14.0-preview.202404180001",
            "v1.14.0-preview.202404120001",
            "v1.13.0-preview.202403280001",
            "v1.13.0",
            "v1.13.0-preview.202403210001",
            "v1.12.0",
            "v1.12",
            "v1.12.0-preview.202402290001",
            "v1.12.0-preview.202402220002",
            "v1.11.1-preview.202402220001",
            "v1.11.1-preview.202402150001",
            "v1.11.1-preview.202402080001",
            "v1.11.1",
            "v1.11.0",
            "v1.11.0-preview.202401300001",
            "v1.10.1",
            "v1.10.0",
            "v1.10.0-preview.202312220001",
            "v1.9.1",
            "v1.9.0-preview.202311300001",
            "v1.9.0-preview.202311230001",
            "v1.9.0-preview.202311160001",
            "v1.8.2",
            "v1.8.1",
            "v1.8.0",
            "v1.8.0-preview.202310260001",
            "v1.8.0-preview.202310190001",
            "v1.7.0",
            "v1.8.0-preview.202310120001",
            "v1.7.0-preview.202309280001",
            "v1.7.0-preview.202309210001",
            "v1.6.1",
            "v1.6.0",
            "v1.6.0-preview.202309070001",
            "v1.6.0-preview.202308310001",
            "v1.6.0-preview.202308240001",
            "v1.5.1",
            "v1.5.0",
            "v1.5.0-preview.202308030001",
            "v1.5.0-preview.202307270001",
            "v1.5.0-preview.202307200001",
            "v1.5.0-preview.202307170006",
            "v1.4.0",
            "v1.3.0",
            "v1.2.1",
            "v1.2.0",
            "v1.1.1",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v0.11.1",
            "v0.11.0",
            "v0.10.0",
            "v0.9.0",
            "v0.8.3",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.0",
            "v0.7.1",
            "v0.6.0",
            "v0.5.1",
            "v0.5.0",
            "v0.4.0",
            "v0.3.0",
            "v0.2.1",
            "v0.2.0",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "v0.0.23",
            "v0.0.22",
            "v0.0.21",
            "v0.0.20",
            "v0.0.19",
            "v0.0.18",
            "v0.0.17",
            "v0.0.16",
            "v0.0.15",
            "v0.0.14",
            "v0.0.13",
            "v0.0.12",
            "v0.0.11",
            "v0.0.10",
            "v0.0.9",
            "v0.0.8",
            "v0.0.7",
            "v0.0.6",
            "v0.0.5",
            "v0.0.4",
            "v0.0.3",
            "v0.0.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41134.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.007918892Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41134.json",
        "https://github.com/microsoft/kiota/security/advisories/GHSA-2hx3-vp6r-mg3f",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41134"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41134.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41134",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 515971,
  "published_at": "2026-04-22T20:20:57.541+00:00"
}