Skip to main content

Refitter CVE-2026-63345

HIGH
Code Injection (CWE-94)
2026-10-30 GitHub_M
8.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish attacker-influenced OpenAPI spec
  2. Delivery
    Developer runs Refitter codegen (default validation)
  3. Exploit
    Crafted path key breaks out of [Get("...")] attribute
  4. Execution
    Inject top-level file class with [ModuleInitializer]
  5. Persist
    Compile generated .cs into application
  6. Impact
    Attacker code executes at assembly load

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the victim to generate a Refit client with Refitter <= 2.0.0 from an attacker-controlled or attacker-influenced OpenAPI document whose paths-object key is a crafted single-line, slash-prefixed string containing quote/structure-breaking characters, and then compile the generated .cs into an application. The payload survives Refitter's default OpenAPI validation, so --skip-validation is NOT required. Code runs via a [ModuleInitializer] at assembly load/process startup even if the generated client is never invoked. Limiting factors: exploitation depends on a developer-driven codegen-plus-compile workflow against an untrusted spec (UI:A); it does not affect already-built applications unless they are regenerated and recompiled from a malicious spec; the enum and default-value sinks are escaped and are not exploitable - only the path-emission (and raw [Header] name) sinks are. Upgrading to 2.1.2 (which escapes the route template and adds AttributeStringValidator) is the fix.

Impact

Signals are moderate-to-serious but conditional. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:A, VC/VI/VA:H, score 8.6) describes full code execution with no authentication, but UI:A is doing heavy lifting: exploitation is not a direct network strike on a running service - it requires a developer to run Refitter codegen against an attacker-controlled/influenced OpenAPI spec and compile the output. No EPSS score and no KEV status were provided in the input, so there is no confirmed active-exploitation or probability signal; exploitation status is best described as a public PoC reference existing (reproduce.sh/make_spec.py attached to the advisory), not confirmed in-the-wild use. The vuln.today decision label is 'this_week' (not act_now/emergency), consistent with a real but not fire-drill priority. CWE-94 code injection resulting in [ModuleInitializer] execution at assembly load is high-impact (runs even if the generated client is never called), which justifies treating it seriously for any team that generates Refit clients from untrusted or externally-sourced specs. Conflicting data to verify: the GHSA package-metadata line reads 'fixed in: not yet patched' while the CVE description, release tag 2.1.2, PR 1178, and commit 793d263 all indicate a fix shipped in 2.1.2 - treat 2.1.2 as the fixed version and verify the stale 'not yet patched' label with the vendor. Net: a genuine RCE but with a supply-chain-style precondition (untrusted OpenAPI input + compilation), so prioritize for CI/codegen pipelines ingesting external specs rather than as a broad internet-exposed emergency.

Exploit ScenarioDerived

An attacker controls or influences an OpenAPI description that a .NET team imports (e.g., a hosted/third-party spec), embedding a crafted single-line, slash-prefixed path key that closes the [Get("...")] attribute and injects a top-level file class with a [ModuleInitializer] method. A developer generates a Refit client with Refitter <= 2.0.0 under default validation (no --skip-validation needed) and compiles it into an application; at assembly load the attacker's code runs even though Main never touches the generated client. Public reproduction scripts (reproduce.sh, make_spec.py) are attached to the advisory, demonstrating the marker written at startup.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 30, 2026

Code execution at assembly load in applications built from Refitter 2.0.0 and earlier: the generator copies each OpenAPI paths-object key verbatim into Refit route attributes such as [Get("...")] without escaping quotes or restricting characters, so a crafted single-line, slash-prefixed path can terminate the attribute string, the enclosing interface and namespace, inject a top-level file class carrying a [ModuleInitializer], and reopen the generated structure so the file still compiles. Anything that compiles the generated .cs into an application then runs the attacker's code at process startup, even if the generated client is never called. Exploitation requires the victim to generate and compile a client from an attacker-controlled or attacker-influenced spec (UI:R in the assessed vector, UI:A in the CVSS 4.0 vector); a public PoC reference (a reproduce script plus spec generator attached to the advisory) exists and is not verified as working exploit code. Fixed in 2.1.2; no confirmed active exploitation (CISA KEV) is reported.

RemediationAI

Vendor-released patch: upgrade Refitter to 2.1.2, which escapes the route template and header/content-type values via ParameterNaming.EscapeString and adds AttributeStringValidator to reject paths, header names and content-type keys containing quotes, backslashes or control characters (advisory: https://github.com/christianhelle/refitter/security/advisories/GHSA-3fhm-p725-h3g3; fix: https://github.com/christianhelle/refitter/pull/1178; release: https://github.com/christianhelle/refitter/releases/tag/2.1.2). Because the injected [ModuleInitializer] executes at assembly load, upgrading the generator alone does not clean already-generated artifacts: regenerate the client and rebuild/redeploy any assembly that was produced from an untrusted or untrusted-influenced OpenAPI description, and review previously generated .cs files for injected file-scoped classes or ModuleInitializer methods. Until the upgrade is in place, the actionable control is to avoid running Refitter against OpenAPI documents you do not control or fully review, and to inspect generated source before compiling it; do not rely on --skip-validation as a workaround, since the new validator is what rejects malicious paths unless validation is explicitly skipped. Regenerating from a trusted spec with 2.1.2 is the complete fix; there is no runtime mitigation for a client already compiled from a malicious spec other than rebuilding it.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Refitter is a .NET/NuGet tool that consumes an OpenAPI description and emits C

source using the Refit REST client library, where each operation becomes an interface method annotated with an attribute whose argument is the literal route template, e.g. [Get("/pets/{id}")]. The root cause is CWE-94 code injection through generated source: the path key is interpolated into the attribute string without escaping, so characters such as a double quote or backslash break out of the string literal and into C

syntax. Because the payload is a legal single-line, slash-prefixed path, it passes Refitter's default OpenAPI validation - --skip-validation is not needed - and the resulting file remains syntactically valid by closing and reopening the namespace and interface around an injected file-scoped class. The [ModuleInitializer] attribute causes the .NET runtime to invoke the injected static method automatically when the generated assembly is loaded, giving execution at application startup rather than only when the client is invoked. The advisory and the fix in PR 1178 show the path sink was one of several raw string sinks: Accept/Content-Type header values derived from content-map keys and [Header("<name>")] parameter names (including API-key security scheme header names) were also emitted unescaped, with the header-name case at minimum a build-breaking denial of service. The enum and default-value sinks were already escaped and are not exploitable. The patch routes these values through ParameterNaming.EscapeString (now also encoding control characters as \uXXXX) and adds an AttributeStringValidator that rejects paths, header names and content-type keys containing quotes, backslashes or control characters unless validation is skipped. The affected CPE is cpe:2.3:a:christianhelle:refitter (all versions before the fix).

Know when Refitter gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.6 HIGH
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
vuln.today AI 8.8 HIGH

Malicious spec is network-sourced (AV:N) with low complexity and no auth (PR:N), but needs the developer to generate and compile (UI:R); injected code yields full C/I/A:H within the compiled app (S:U).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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("<path>")] 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.

Technical POC Analysis

CWE-94 (Improper Control of Generation of Code), with a secondary CWE-1116 tag in the advisory.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

CVE-2026-63345 in Refitter versions 2.0.0 and earlier allows code execution at assembly load if a developer generates and compiles a client from a malicious OpenAPI specification. This affects development teams using Refitter to generate Refit clients, potentially enabling attackers to execute code at process startup when the compiled application is run, even if the client is never called. Leadership should care because this could lead to supply chain compromise and unauthorized code execution within development or production environments, though it requires user interaction to import and compile a malicious spec.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 71% exploitable
Prevalence
Low
niche .NET developer codegen tool (Refit client generator), not enterprise infrastructure
Social Media
1
Sightings
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

43
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

cpe:2.3:a:christianhelle:refitter:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy