Refitter
CVE-2026-63344
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious content-type key in OpenAPI spec
-
DeliveryVictim generates Refit client with Refitter
-
ExploitBreakout injects file class with [ModuleInitializer]
-
ExecutionCompiled assembly loads at app startup
-
ImpactArbitrary code execution in victim process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an attacker-controlled or attacker-influenced OpenAPI description whose requestBody/responses content map contains a crafted content-type KEY (e.g. 'application/<breakout>') embedding quotation marks to break out of the generated Refit [Headers("Accept: <ct>", "Content-Type: <ct>")] attribute. The affected product is Refitter <= 2.0.0; the malicious key survives Refitter's DEFAULT OpenAPI validation, so --skip-validation is NOT required. Exploitation is gated by developer/build-time action (UI:A): a victim must run Refitter on the hostile spec and compile the generated client into an application; code then runs automatically at assembly load via [ModuleInitializer] with no call to the client. Limiting factors: the spec must be attacker-influenced (not an issue for fully trusted internal specs), the victim must generate and build the client, and upgrading to 2.1.2 (which escapes the characters and adds AttributeStringValidator) closes it. Verified on Refitter 2.0.0 and .NET 8. |
| Impact | This is a CWE-94/CWE-116 code-injection flaw in Refitter (a C Refit client generator) rated CVSS 4.0 8.6 (AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H). The high score is driven by full confidentiality/integrity/availability impact from arbitrary code execution, with no authentication (PR:N) and low complexity (AC:L). The critical tempering signal is UI:A: exploitation is not a remote drive-by - it requires a developer to take an attacker-influenced OpenAPI description, run Refitter against it (default validation, no --skip-validation needed), and compile the result; the injected [ModuleInitializer] then runs at assembly load without any call to the client. The vuln.today Decision label is 'this_week', consistent with a serious but not emergency finding. No EPSS score and no KEV listing are present in the provided data, and there is no indication of active exploitation, so this is 'no public exploit identified as confirmed' though PoC scripts (reproduce.sh, make_spec.py) are referenced by the advisory. Net: a genuine high-priority issue specifically for teams that generate Refit clients from third-party or otherwise untrusted/attacker-influenced OpenAPI specs; materially lower real-world risk for teams generating only from trusted, internally-controlled specifications. Note one conflict: the embedded GHSA package metadata says 'not yet patched', while the advisory description and the 2.1.2 release tag state the fix shipped in 2.1.2 - treat 2.1.2 as the fixed version. |
| Exploit ScenarioDerived | An attacker crafts or influences an OpenAPI description so that a content-type key in a requestBody/responses content map contains quote/breakout characters. A developer generates a Refit client with Refitter (<= 2.0.0) under default validation and compiles it into an application; the crafted key breaks out of the [Headers("Accept: ...", "Content-Type: ...")] attribute and injects a top-level file class with a [ModuleInitializer] method, so attacker code executes at assembly load during application startup - even though application code never calls the generated client. A public PoC reference exists (reproduce.sh + make_spec.py); it is not verified as working exploit code in the provided data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Refitter, the .NET tool that generates C
Refit clients from OpenAPI descriptions, writes content-type keys from requestBody/responses content maps straight into Refit [Headers("Accept: <ct>", "Content-Type: <ct>")] attribute strings without escaping quotation marks, letting a crafted content-type key break out of the attribute, interface and namespace and inject a top-level file class whose [ModuleInitializer] method runs attacker code when the generated assembly loads. The hostile key survives Refitter's default OpenAPI validation, so --skip-validation is not required; behavior was verified on Refitter 2.0.0 with .NET 8, and all versions prior to 2.1.2 are in scope. Exploitation is not self-triggering: a developer must run Refitter on an attacker-influenced spec and compile the resulting client into an application (CVSS 4.0 UI:A / 3.1 UI:R), after which the injected code executes at process startup with no call to the generated client; there is no CISA KEV entry or confirmed active exploitation, and a public PoC reference (reproduce.sh, make_spec.py) is attached to the GitHub advisory but is not independently verified as working exploit code.
RemediationAI
Upgrade Refitter to 2.1.2 or later (https://github.com/christianhelle/refitter/releases/tag/2.1.2), which applies ParameterNaming.EscapeString to content-type keys in the Accept/Content-Type headers, to OpenAPI paths, header parameter names and API-key security scheme names, encodes control characters as \uXXXX escapes, and adds AttributeStringValidator that rejects quotes, backslashes and control characters with a clear error unless --skip-validation is passed (https://github.com/christianhelle/refitter/pull/1178, commit ab4d8e439d6f0ee82ad49ee15323978d70fe5a67). Because the flaw only fires during code generation, the effective interim control is to treat OpenAPI descriptions as untrusted source code: restrict which specs the generation step consumes to trusted, reviewed documents, and review the generated .cs output - particularly [Headers(...)] attribute literals and any unexpected top-level class or [ModuleInitializer] - before compiling it, accepting that this adds a manual review gate and will not scale to external or third-party spec feeds. Do not rely on --skip-validation as a mitigation; the validator only blocks unsafe characters when validation is enabled. Since exploitation requires a developer to regenerate and rebuild, rotating or re-pinning specs consumed by CI and checking existing generated clients for injected top-level classes or module initializers covers builds produced before the upgrade.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Refitter (NuGet package Refitter, CPE cpe:2.3:a:christianhelle:refitter) is a C
code generator that converts OpenAPI/Swagger documents into Refit client interfaces. Refit expresses per-method HTTP headers through the [Headers("...")] attribute, whose argument is a C
string literal - so any spec-derived value placed in that literal must be encoded for C
before emission. Here the content map keys of an operation's requestBody and responses are concatenated verbatim into that literal; a key containing a double quote terminates the literal, and the remainder can close the interface and namespace and open a top-level file class with a [ModuleInitializer] method, then reopen scopes so the output still compiles. Because .NET runs module initializers at assembly load, the injected body executes at application startup. This is CWE-94 (code generation with uncontrolled input) compounded by CWE-116 (improper output encoding), the same class as the sibling issues referenced in the fix - GHSA-3fhm-p725-h3g3 (OpenAPI path in the verb attribute) and GHSA-58x9-vjvp-6mx8 (header names and API-key security scheme names) - which the upstream patch addresses with one shared encoder, ParameterNaming.EscapeString, applied to paths, Accept/Content-Type values, header parameters and security scheme names, plus a new AttributeStringValidator that rejects quotes, backslashes and control characters unless --skip-validation is used. The validator deliberately skips content-type key checks for OpenAPI 2.0 documents, where those keys are not emitted as headers. The trigger is a crafted content-type key in an attacker-influenced specification; no memory-safety or runtime parsing weakness is involved.
Know when Refitter gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Spec is remotely sourced (AV:N) and no auth is needed (PR:N), but a developer must generate and build from the hostile spec (UI:R); code execution yields full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
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.
Technical POC Analysis
CWE-94 (Improper Control of Generation of Code), with CWE-116 (Improper Encoding or Escaping of Output) as the underlying mechanism.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-63344 affects Refitter, the .NET code-generation tool used to build Refit API clients from OpenAPI specs, and allows a maliciously crafted spec to inject code that executes when a developer compiles and loads the generated client. The practical risk is concentrated in engineering teams whose build workflows ingest OpenAPI specifications from external or untrusted sources, since a single compromised or attacker-supplied spec could silently execute attacker code inside applications built from it. Leadership should care because the exposure path runs through a development-time tool that can contaminate downstream production software, elevating this from an ordinary library vulnerability to a potential software supply-chain issue.
No vendor-released patch identified at time of analysis; interim mitigations include restricting Refitter execution to trusted, internally controlled OpenAPI specifications, reviewing and sanitizing content-type keys in specs before generation, and manually inspecting generated client source prior to compilation.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Affected Products (CPE)CVE.org
Code execution at assembly load in Refitter-generated C# clients (CWE-94/CWE-116): a header parameter name taken from an
Code execution at assembly load in applications built from Refitter 2.0.0 and earlier: the generator copies each OpenAPI
Generation-time server-side request forgery, remote file inclusion and out-of-tree local file inclusion in the Refitter
NVD
CVE.org
EPSS
GitHub
Exploit-DB