{"id":"CVE-2026-63346","kind":"vulnerability","aliases":["CVE-2026-63346"],"related":[],"title":"Refitter: crafted OpenAPI header name injects code into generated C# client","description":"Refitter is a tool for generating a C# REST API client using the Refit library. Prior to 2.1.2, the header parameter name in `parameters[].name` with `in: header` is emitted verbatim into a Refit `[Header(\"<name>\")]` attribute string without escaping quotation marks. An attacker-influenced OpenAPI description can pass default validation without `--skip-validation` and break out from the parameter-list position by closing the parameter and method syntax, attribute, interface, and namespace. The generated file can remain valid C# while containing a top-level file class with a `[ModuleInitializer]` method, which executes attacker code when the compiled assembly is loaded at application startup, even if the client is never called. Query `AliasAs` and enum/default value sinks are escaped; this flaw is in header-name attribute-string emission. The behavior was verified with Refitter 2.0.0 and .NET 8. This issue is fixed in version 2.1.2.","summary":"Refitter, a tool that generates C# REST clients from OpenAPI files, fails to escape quotation marks in header parameter names, so a crafted OpenAPI description can inject code. The injected [ModuleInitializer] runs attacker code when the compiled assembly loads, even if the client is never called.","severity":"high","cvss":8.6,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["csharp","dotnet","openapi","package","refit","refitter"],"not_affected_if":["no-header-parameters","refitter-2.1.2-or-later","trusted-openapi-specs-only"],"how_to_check":"- Check the installed Refitter version (for example `refitter --version` or the version in your project's tool manifest); versions before `2.1.2` are affected.\n- Look for generated C# clients whose `[Header(\"...\")]` attributes contain unexpected quotation marks or a `[ModuleInitializer]` method in a top-level file class.\n- Check whether generation runs on OpenAPI specs from outside your organisation.","fix":"- Refitter: upgrade to `2.1.2`.","status":"open","published_at":"2026-10-30T23:17:14+00:00","first_seen_at":"2026-10-30T23:26:12+00:00","triaged_at":"2026-10-30T23:28:02+00:00","updated_at":"2026-10-30T23:28:02+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-30T23:28:02Z","model":"claude-haiku-5-5","output":{"fix":"- Refitter: upgrade to `2.1.2`.","reach":"local","title":"Refitter: crafted OpenAPI header name injects code into generated C# client","impact":"high","summary":"Refitter, a tool that generates C# REST clients from OpenAPI files, fails to escape quotation marks in header parameter names, so a crafted OpenAPI description can inject code. The injected [ModuleInitializer] runs attacker code when the compiled assembly loads, even if the client is never called.","audience":"developers","category":"package","nicknames":[],"who_cares":["refitter","csharp","dotnet","refit","openapi"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Attacker code runs when the compiled client assembly loads","analyst_note":"","how_to_check":"- Check the installed Refitter version (for example `refitter --version` or the version in your project's tool manifest); versions before `2.1.2` are affected.\n- Look for generated C# clients whose `[Header(\"...\")]` attributes contain unexpected quotation marks or a `[ModuleInitializer]` method in a top-level file class.\n- Check whether generation runs on OpenAPI specs from outside your organisation.","plain_action":"","needs_analyst":false,"not_affected_if":["refitter-2.1.2-or-later","trusted-openapi-specs-only","no-header-parameters"],"who_is_affected":"Teams that run Refitter to generate C# clients from OpenAPI descriptions, especially where the description can come from an untrusted source. The flaw is in header parameter names; query parameters and enum or default values are escaped. The issue was verified with Refitter 2.0.0 and .NET 8.","user_interaction":"yes","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000745,"input_tokens":4322,"output_tokens":625,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-63346':14A,17A '2.0.0':209C '2.1.2':87C,219C '8':212C 'aliasa':185C 'api':79C 'applic':175C 'assembl':61B,171C 'attack':56B,113C,166C 'attacker-influenc':112C 'attribut':105C,141C,200C 'attribute-str':199C 'behavior':204C 'break':126C 'c':10A,29B,77C,151C 'call':69B,183C 'class':159C 'client':11A,31B,66B,80C,180C 'close':135C 'code':7A,51B,57B,167C 'compil':60B,170C 'contain':153C 'craft':2A,46B 'csharp':18B 'cve':12A,15A 'default':119C 'descript':48B,116C 'dotnet':19B 'emiss':202C 'emit':99C 'enum/default':187C 'escap':37B,108C,191C 'even':63B,177C 'execut':165C 'fail':35B 'file':34B,147C,158C 'fix':216C 'flaw':193C 'generat':9A,28B,75C,146C 'header':4A,41B,89C,97C,104C,197C 'header-nam':196C 'influenc':114C 'inject':6A,50B,53B 'interfac':142C 'issu':214C 'level':157C 'librari':84C 'list':132C 'load':62B,173C 'mark':39B,110C 'method':139C,163C 'moduleiniti':54B,162C 'name':5A,43B,91C,94C,198C 'namespac':144C 'net':211C 'never':68B,182C 'openapi':3A,20B,33B,47B,115C 'packag':21B 'paramet':42B,90C,93C,131C,137C 'parameter-list':130C 'pass':118C 'posit':133C 'prior':85C 'queri':184C 'quotat':38B,109C 'refit':22B,83C,103C 'refitt':1A,23B,24B,70C,208C 'remain':149C 'rest':30B,78C 'run':55B 'sink':189C 'skip':123C 'skip-valid':122C 'startup':176C 'string':106C,201C 'syntax':140C 'tool':26B,73C 'top':156C 'top-level':155C 'use':81C 'valid':120C,124C,150C 'valu':188C 'verbatim':100C 'verifi':206C 'version':218C 'without':107C,121C","nicknames":[],"mitigations":[],"who_affected":"Teams that run Refitter to generate C# clients from OpenAPI descriptions, especially where the description can come from an untrusted source. The flaw is in header parameter names; query parameters and enum or default values are escaped. The issue was verified with Refitter 2.0.0 and .NET 8.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T23:17:14+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-63346","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63346","severity":null,"published_at":"2026-10-30T23:17:14+00:00","modified_at":"2026-10-30T23:17:14+00:00","first_seen_at":"2026-10-30T23:26:12+00:00","fetched_at":"2026-10-30T23:26:12+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}