CVE-2026-63346
Critical 9.3No known exploitationFix availableRefitter allows code execution through unescaped OpenAPI header parameter names
Vendor advisory: GHSA-58x9-vjvp-6mx8
Record last updated
CVSS score
Critical on a 0 to 10 scale
EPSS, chance of exploitation in 30 days
No EPSS score available
CISA remediation deadline
Not in the KEV catalog
Description
### Summary 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. ### 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. ### Impact Code execution at assembly load (process startup) in any application that compiles a Refitter client generated from an attacke…
Weakness: CWE-94, CWE-116
Patching and mitigation
- Patch status
- Fix available (source: GitHub Advisory Database)
- Fix documented (source date)
- Mitigation
- None documented
- Vendor guidance
- github.com (opens in a new tab)
Affected products
| Vendor | Product | Affected versions | Fixed in | Per |
|---|---|---|---|---|
| nuget | Refitter | all versions before 2.1.2 | 2.1.2 | GitHub Advisory Database |
Timeline
Patch
Fix documented by GitHub Advisory Database
Vendor guidance and references
- GitHub Advisory GHSA-58x9-vjvp-6mx8 (opens in a new tab)github-advisory