{"id":"CVE-2026-63344","kind":"vulnerability","aliases":["CVE-2026-63344"],"related":[],"title":"Refitter: crafted OpenAPI content-type key 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, content-type keys in the content maps of `requestBody/responses` are emitted verbatim into a Refit `[Headers(\"Accept: <ct>\", \"Content-Type: <ct>\")]` attribute string without escaping quotation marks. A crafted content-type key in an attacker-influenced OpenAPI description survives default validation without `--skip-validation`, breaks out of the attribute string and enclosing interface and namespace, and can introduce a top-level file class while leaving valid generated C#. A `[ModuleInitializer]` method in that class executes attacker code when the generated assembly is loaded at application startup, without requiring a call to the client. The behavior was verified with Refitter 2.0.0 and .NET 8. This issue is fixed in version 2.1.2.","summary":"Refitter is a tool that generates C# REST clients from OpenAPI files. A crafted content-type key in an OpenAPI description breaks out of generated code and adds a module initializer that runs attacker code when the generated assembly loads.","severity":"high","cvss":8.6,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["csharp","dotnet","openapi","package","refit","refitter"],"not_affected_if":["hand-written-clients","trusted-openapi-only"],"how_to_check":"- Check the installed Refitter version with `refitter --version` or the package reference in the project file.\n- Look for Refitter use in build or code generation steps that read OpenAPI descriptions from untrusted or third-party sources.","fix":"- Refitter: move to `2.1.2` or later.","status":"open","published_at":"2026-10-30T23:17:13+00:00","first_seen_at":"2026-10-30T23:26:12+00:00","triaged_at":"2026-10-30T23:28:03+00:00","updated_at":"2026-10-30T23:28:03+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-30T23:28:03Z","model":"claude-haiku-5-5","output":{"fix":"- Refitter: move to `2.1.2` or later.","reach":"unknown","title":"Refitter: crafted OpenAPI content-type key injects code into generated C# client","impact":"high","summary":"Refitter is a tool that generates C# REST clients from OpenAPI files. A crafted content-type key in an OpenAPI description breaks out of generated code and adds a module initializer that runs attacker code when the generated assembly loads.","audience":"developers","category":"package","nicknames":[],"who_cares":["csharp","dotnet","refit","refitter","openapi"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"attacker code runs when the generated assembly loads at startup","analyst_note":"","how_to_check":"- Check the installed Refitter version with `refitter --version` or the package reference in the project file.\n- Look for Refitter use in build or code generation steps that read OpenAPI descriptions from untrusted or third-party sources.","plain_action":"","needs_analyst":false,"not_affected_if":["hand-written-clients","trusted-openapi-only"],"who_is_affected":"Teams that run Refitter to generate C# Refit clients from OpenAPI descriptions, especially where those descriptions come from outside sources. The flaw is in the generator, so the risk sits in the build or code generation step and in the generated assembly that then runs in the application. Teams that only write clients by hand or generate from descriptions they fully control are less exposed.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.0007,"input_tokens":4297,"output_tokens":541,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':15A,18A '-63344':16A,19A '2.0.0':188C '2.1.2':84C,198C '8':191C 'accept':102C 'add':54B 'api':76C 'applic':173C 'assembl':65B,169C 'attack':60B,121C,164C 'attacker-influenc':120C 'attribut':106C,136C 'behavior':183C 'break':48B,132C 'c':12A,32B,74C,156C 'call':178C 'class':151C,162C 'client':13A,34B,77C,181C 'code':9A,52B,61B,165C 'content':5A,41B,86C,91C,104C,115C 'content-typ':4A,40B,85C,103C,114C 'craft':2A,39B,113C 'csharp':20B 'cve':14A,17A 'default':126C 'descript':47B,124C 'dotnet':21B 'emit':96C 'enclos':139C 'escap':109C 'execut':163C 'file':37B,150C 'fix':195C 'generat':11A,31B,51B,64B,72C,155C,168C 'header':101C 'influenc':122C 'initi':57B 'inject':8A 'interfac':140C 'introduc':145C 'issu':193C 'key':7A,43B,88C,117C 'leav':153C 'level':149C 'librari':81C 'load':66B,171C 'map':92C 'mark':111C 'method':159C 'modul':56B 'moduleiniti':158C 'namespac':142C 'net':190C 'openapi':3A,22B,36B,46B,123C 'packag':23B 'prior':82C 'quotat':110C 'refit':24B,80C,100C 'refitt':1A,25B,26B,67C,187C 'requestbody/responses':94C 'requir':176C 'rest':33B,75C 'run':59B 'skip':130C 'skip-valid':129C 'startup':174C 'string':107C,137C 'surviv':125C 'tool':29B,70C 'top':148C 'top-level':147C 'type':6A,42B,87C,105C,116C 'use':78C 'valid':127C,131C,154C 'verbatim':97C 'verifi':185C 'version':197C 'without':108C,128C,175C","nicknames":[],"mitigations":[],"who_affected":"Teams that run Refitter to generate C# Refit clients from OpenAPI descriptions, especially where those descriptions come from outside sources. The flaw is in the generator, so the risk sits in the build or code generation step and in the generated assembly that then runs in the application. Teams that only write clients by hand or generate from descriptions they fully control are less exposed.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"first_public_at":"2026-10-30T23:17:13+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-63344","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63344","severity":null,"published_at":"2026-10-30T23:17:13+00:00","modified_at":"2026-10-30T23:17:13+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"}