Security Digest · Vulnerability record

CVE-2026-63345: Refitter allows arbitrary code execution through unescaped OpenAPI paths

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.

  • No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
  • 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, OpenAPI paths-object keys are emitted verbatim into Refit route attributes such as [Get(" ")] without escaping quotation marks or restricting characters. An attacker-influenced single-line, slash-prefixed path survives default validation without --skip-validation and can close the attribute string, interface, and namespace while introducing a top-level file class and reopening the generated structure to keep valid C#. A [ModuleInitializer] method executes attacker code when an application compiles and loads the generated assembly at startup, even without calling the generated client. The enum and default value sinks are escaped and are not the vulnerable path-emission sink. The behavior was verified on Refitter 2.0.0 with .NET 8. This issue is fixed in version 2.1.2.

From the GitHub advisory

Summary

Refitter emits each OpenAPI path (the paths-object key) verbatim into a Refit [Get(" ")] attribute string, without escaping " or restricting characters. A crafted single-line, /-prefixed path survives Refitter's default OpenAPI validation yet closes the attribute string and the enclosing interface + namespace, injects a top-level file class with a [ModuleInitializer] method, and reopens a namespace + interface so the file stays valid. .NET runs [ModuleInitializer] methods when the generated assembly is loaded, so the attacker's code executes at application startup. Verified on Refitter 2.0.0 / .NET 8.

Details

No --skip-validation is needed (the payload is a valid single-line path). The generated .cs is compiled into the victim application; the module initializer runs at assembly load. This is distinct from the value sinks (enum/default), which are escaped; the path sink has no escaping. The [Header(" ")] attribute is likewise emitted raw (header parameter names), at minimum a build-breaking DoS.

PoC

Weakness type: CWE-94, CWE-1116.

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 none, 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-3fhm-p725-h3g3 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-3fhm-p725-h3g3 github.com
  2. CVE.org record CVE-2026-63345 cve.org
  3. NVD entry CVE-2026-63345 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