All vulnerabilities

NuGet

CVE-2026-63346

Refitter allows code execution through unescaped OpenAPI header parameter names

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
Improper output encoding (CWE-116)Code injection (CWE-94)
Also known as
GHSA-58x9-vjvp-6mx8
Sources
OSV.dev and GitHub

Description

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.

Code execution at assembly load (process startup) in any application that compiles a Refitter client generated from an attacker-controlled or attacker-influenced…

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