Refitter: C# source injection through OpenAPI content-type map keys
Impact
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: ", "Content-Type: ")] 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…
Source excerpt · GitHub_MAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
christianhelle · GitHub_M
refitter
1 range
christianhelle · GitHub_M
refitter
Compare with this publisher’s ranges. This does not inspect your installation.
affected
< 2.1.2
Other versions: unknown
Original source 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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-63344View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 1
Assigning organization
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.