{"id":"CVE-2026-63345","kind":"vulnerability","aliases":["CVE-2026-63345"],"related":[],"title":"Refitter: crafted OpenAPI paths let attacker code run at build","description":"Refitter is a tool for generating a C# REST API client using the Refit library. Prior to 2.1.2, OpenAPI `paths`-object keys are emitted verbatim into Refit route attributes such as `[Get(\"<path>\")]` without escaping quotation marks or restricting characters. An attacker-influenced single-line, slash-prefixed path survives default validation without `--skip-validation` and can close the attribute string, interface, and namespace while introducing a top-level file class and reopening the generated structure to keep valid C#. A `[ModuleInitializer]` method executes attacker code when an application compiles and loads the generated assembly at startup, even without calling the generated client. The enum and default value sinks are escaped and are not the vulnerable path-emission sink. The behavior was verified on Refitter 2.0.0 with .NET 8. This issue is fixed in version 2.1.2.","summary":"Refitter, a tool that generates C# REST clients from OpenAPI specs, writes path keys into generated code without escaping quotes. A crafted path can inject a ModuleInitializer 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-codegen","package","refit","refitter"],"not_affected_if":["no-generated-refit-clients","refitter-2.1.2-or-later","trusted-openapi-specs-only"],"how_to_check":"- Check the installed Refitter version with `refitter --version` or the version pinned in the project's tool manifest.\n- Look for generated Refit client files built from OpenAPI specs that you do not fully control.","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:02+00:00","updated_at":"2026-10-30T23:28:02+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-30T23:28:02Z","model":"claude-haiku-5-5","output":{"fix":"- Refitter: move to `2.1.2` or later.","reach":"local","title":"Refitter: crafted OpenAPI paths let attacker code run at build","impact":"high","summary":"Refitter, a tool that generates C# REST clients from OpenAPI specs, writes path keys into generated code without escaping quotes. A crafted path can inject a ModuleInitializer that runs attacker code when the generated assembly loads.","audience":"developers","category":"package","nicknames":[],"who_cares":["csharp","dotnet","refit","refitter","openapi-codegen"],"confidence":0.7,"fix_status":"available","needs_auth":"unknown","worst_case":"attacker code runs when the generated assembly loads","analyst_note":"Confirm whether the attacker must control the OpenAPI spec input and whether the NVD entry lists any additional exploitation conditions.","how_to_check":"- Check the installed Refitter version with `refitter --version` or the version pinned in the project's tool manifest.\n- Look for generated Refit client files built from OpenAPI specs that you do not fully control.","plain_action":"","needs_analyst":true,"not_affected_if":["refitter-2.1.2-or-later","trusted-openapi-specs-only","no-generated-refit-clients"],"who_is_affected":"Teams that run Refitter to generate C# Refit clients from OpenAPI specs, especially specs from outside sources. The generated code must be compiled and loaded for the payload to run, so teams that only use hand-written clients or a fixed, trusted spec are not exposed. Versions before 2.1.2 are affected; the report says the default validation does not block the crafted path.","user_interaction":"yes","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000732,"input_tokens":4302,"output_tokens":604,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':12A,15A '-63345':13A,16A '2.0.0':190C '2.1.2':78C,200C '8':193C 'api':70C 'applic':152C 'assembl':59B,158C 'attack':6A,54B,102C,148C 'attacker-influenc':101C 'attribut':89C,122C 'behavior':185C 'build':10A 'c':30B,68C,143C 'call':163C 'charact':99C 'class':134C 'client':32B,71C,166C 'close':120C 'code':7A,41B,55B,149C 'codegen':21B 'compil':153C 'craft':2A,46B 'csharp':17B 'cve':11A,14A 'default':112C,170C 'dotnet':18B 'emiss':182C 'emit':84C 'enum':168C 'escap':43B,94C,174C 'even':161C 'execut':147C 'file':133C 'fix':197C 'generat':29B,40B,58B,66C,138C,157C,165C 'get':92C 'influenc':103C 'inject':49B 'interfac':124C 'introduc':128C 'issu':195C 'keep':141C 'key':38B,82C 'let':5A 'level':132C 'librari':75C 'line':106C 'load':60B,155C 'mark':96C 'method':146C 'moduleiniti':51B,145C 'namespac':126C 'net':192C 'object':81C 'openapi':3A,20B,34B,79C 'openapi-codegen':19B 'packag':22B 'path':4A,37B,47B,80C,110C,181C 'path-emiss':180C 'prefix':109C 'prior':76C 'quot':44B 'quotat':95C 'refit':23B,74C,87C 'refitt':1A,24B,25B,61C,189C 'reopen':136C 'rest':31B,69C 'restrict':98C 'rout':88C 'run':8A,53B 'singl':105C 'single-lin':104C 'sink':172C,183C 'skip':116C 'skip-valid':115C 'slash':108C 'slash-prefix':107C 'spec':35B 'startup':160C 'string':123C 'structur':139C 'surviv':111C 'tool':27B,64C 'top':131C 'top-level':130C 'use':72C 'valid':113C,117C,142C 'valu':171C 'verbatim':85C 'verifi':187C 'version':199C 'vulner':179C 'without':42B,93C,114C,162C 'write':36B","nicknames":[],"mitigations":[],"who_affected":"Teams that run Refitter to generate C# Refit clients from OpenAPI specs, especially specs from outside sources. The generated code must be compiled and loaded for the payload to run, so teams that only use hand-written clients or a fixed, trusted spec are not exposed. Versions before 2.1.2 are affected; the report says the default validation does not block the crafted path.","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-63345","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63345","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"}