home / blog

2026-11-21 · high

CVE-2026-63346: Code Injection Vulnerability in Refitter

Refitter version 2.1.1 and earlier vulnerable to code injection in header attributes.

CVE-2026-63346: Code Injection Vulnerability in Refitter

CVE-2026-63346 is a high severity vulnerability in Refitter, a tool for generating C# REST API clients. The vulnerability allows malicious code injection during code generation when header parameter names are emitted directly into attributes without escaping. A malicious OpenAPI descriptor can include a file class with a method that executes attacker code when the compiled assembly is loaded at application startup, even if the client is never called.

The severity is classified as high with CVSS score 8.6. The vulnerability has been verified with Refitter 2.0.0 and .NET 8, and there are public repositories that claim to contain exploits. The current status is fixed in version 2.1.2, but the criticality remains high for unpatched versions.

In defense, it is strongly recommended to immediately update to Refitter version 2.1.2. For unpatched versions, it's possible to mitigate by using the option to prevent code generation from untrusted OpenAPI descriptors. It is also crucial to validate and sanitize all OpenAPI descriptors before using them with Refitter and limit access to API descriptors only from trusted sources.

At a glance

What
Code injection vulnerability in Refitter during C# client generation
Severity
High (CVSS 8.6)
Affected versions
All versions before 2.1.2
Fix
Update to version 2.1.2
Status
Fixed in version 2.1.2
Action
Apply patch immediately

Sources: NVD, CVE-2026-63346

← All articles