Security Digest · Vulnerability record

CVE-2026-63344: Refitter allows arbitrary code execution through unescaped OpenAPI content-type values

Refitter is a tool for generating a C# REST API client using the Refit library.

CVSS 8.6 High EPSS 0.6% · p48

Should you act?

Normal patch cycle

No exploitation signal; fix it in your next routine update if you are affected. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 0.6%, percentile 48: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 48% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Only applies if your dependency tree includes Refitter (NuGet) < 2.1.2, fixed in 2.1.2. Check your lockfile, including transitive dependencies.

What it is

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

From the GitHub advisory

Summary

Refitter emits the spec's content-type key (content map key in requestBody/responses) verbatim into a Refit [Headers("Accept: ", "Content-Type: ")] attribute string without escaping ". A crafted value survives Refitter's default OpenAPI validation, breaks out of the attribute and the enclosing interface + namespace, injects a top-level file class with a [ModuleInitializer] method, and reopens so the file stays valid. .NET runs [ModuleInitializer] methods at assembly load, so the attacker's code executes at application startup. Verified on Refitter 2.0.0 / .NET 8.

The malicious input is a content-type KEY such as: content: { 'application/ ': {schema} }. No --skip-validation is required.

PoC

reproduce.sh (+ makespec.py) attached: generates with default validation, compiles into a console app, runs it (Main does not touch the client), and shows a marker written at assembly load.

Weakness type: CWE-94, CWE-116.

Product: Refitter (NuGet) · Assigned by: GitHub_M · Published: 2026-10-30

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
NuGetRefitter< 2.1.22.1.2
VendorProductAffected versions (per CVE record)
christianhellerefitter< 2.1.2

Severity scores

Scored byCVSSScoreVector
GitHub_M4.08.6 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub4.09.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: none (no login)
  • User interaction: active

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-11-21): 0.57% probability of exploitation activity in the next 30 days; percentile 48.

Timeline

  • — CVE record published by GitHub_M
  • — CVE record last updated
  • — GitHub-reviewed advisory GHSA-p32v-8v8j-j534 published (critical)

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-p32v-8v8j-j534 github.com
  2. CVE.org record CVE-2026-63344 cve.org
  3. NVD entry CVE-2026-63344 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. github.com github.com
  6. github.com github.com
  7. github.com github.com

Critical NuGet advisories · Today’s Security Digest