All vulnerabilities

NuGet

CVE-2026-63345

Refitter allows arbitrary code execution through unescaped OpenAPI paths

Severity
Critical
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.1.2
Exploit chance
0.6% in the next 30 daysHigher than 47% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-1116Code injection (CWE-94)
Also known as
GHSA-3fhm-p725-h3g3
Sources
OSV.dev and GitHub

Description

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.

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
RefitterNuGet · osv:NuGet:Refitter
  • Every version before 2.1.2

About Refitter

Total downloads (NuGet)
12,814,005NuGet, 23 Nov 2026

References