CVE-2026-63345 — Vulnerability in Refitter — CVE Details
Refitter allows arbitrary code execution through unescaped OpenAPI paths
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.62%). Schedule for your next planned update.
Does your project use an affected Refitter version?
Paste your packages.lock.json to check it for CVE-2026-63345 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
Refitter emits each OpenAPI path (the paths-object key) verbatim into a Refit [Get("<path>")]
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
[Get("/p")] Task<string> Dummy(); } }
file class Evil { [System.Runtime.CompilerServices.ModuleInitializer]
internal static void Init(){ /* attacker code */ } }
namespace N2 { public partial interface I2 { [Get("/q")]
Task<string> GetU(string id);
}
}
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("<name>")] attribute is likewise emitted raw (header parameter names), at minimum a
build-breaking DoS.
PoC
reproduce.sh (+ make_spec.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. Verified
on 2.0.0.
Impact
Code execution at assembly load (process startup) in any application that compiles a Refitter client generated from an attacker-controlled or attacker-influenced OpenAPI description.
Suggested fix
Escape the route template before emitting it into [Get("…")] (escape ", \, reject newlines) and
validate that paths contain only legal URI-template characters. Apply the same encoding to
[Header(…)], [Post/Put/Delete(…)], and every attribute that embeds a spec-derived string.
maintainer-report.txt
make_spec.py
reproduce.sh
Advisory Timeline
- First published November 20, 2026 (6 days ago).
- Last revised November 20, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Refitter --version 2.1.2
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: NuGet (1).
| Package | Fixed In |
|---|---|
| Refitter NuGet · Affected: 0.1.2-alpha, 0.1.3-alpha, 0.1.4-alpha, 0.1.5-alpha (+108 more) | 2.1.2 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1116
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
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
References
- https://github.com/christianhelle/refitter/security/advisories/GHSA-3fhm-p725-h3g3WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-63345ADVISORY
- https://github.com/christianhelle/refitter/pull/1178WEB
- https://github.com/christianhelle/refitter/commit/793d2632899c2022511dfc15e30725ef69073973WEB
- https://github.com/christianhelle/refitterPACKAGE
- https://github.com/christianhelle/refitter/releases/tag/2.1.2WEB
- https://github.com/user-attachments/files/29395228/maintainer-report.txtWEB
- https://github.com/user-attachments/files/29395229/make_spec.pyWEB
- https://github.com/user-attachments/files/29395230/reproduce.shWEB
Frequently Asked Questions
- What is CVE-2026-63345?
- Refitter allows arbitrary code execution through unescaped OpenAPI paths. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2026-63345?
- CVE-2026-63345 affects Refitter. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-63345 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 43.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-118740CRITICAL
Microsoft Security Advisory CVE-2026-118740 - Aspire Security Feature Bypass Vulnerability
- CVE-2026-63346CRITICAL
Refitter allows code execution through unescaped OpenAPI header parameter names
- CVE-2026-63344CRITICAL
Refitter allows arbitrary code execution through unescaped OpenAPI content-type values
- CVE-2026-88092CRITICAL
Microsoft Security Advisory CVE-2026-88092 - ASP.NET Core Security Feature Bypass Vulnerability
- CVE-2026-63184HIGH
Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion