Security Digest · Vulnerability record

CVE-2026-63346: Refitter allows code execution through unescaped OpenAPI header parameter names

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, the header parameter name in parameters[].name with in: header is emitted verbatim into a Refit [Header(" ")] attribute string without escaping quotation marks. An attacker-influenced OpenAPI description can pass default validation without --skip-validation and break out from the parameter-list position by closing the parameter and method syntax, attribute, interface, and namespace. The generated file can remain valid C# while containing a top-level file class with a [ModuleInitializer] method, which executes attacker code when the compiled assembly is loaded at application startup, even if the client is never called. Query AliasAs and enum/default value sinks are escaped; this flaw is in header-name attribute-string emission. 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 header parameter name (parameters[].name with in: header) verbatim into a Refit [Header(" ")] 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.

Notable: the breakout starts from a PARAMETER-LIST position (it closes the params and method first). The malicious input is a header parameter name. No --skip-validation is required. The query AliasAs and value sinks (enum, default) are escaped; the gap is in the attribute-string emission.

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-58x9-vjvp-6mx8 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-58x9-vjvp-6mx8 github.com
  2. CVE.org record CVE-2026-63346 cve.org
  3. NVD entry CVE-2026-63346 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