CVE-2026-63344: Refitter allows arbitrary code execution through unescaped OpenAPI content-type values
Refitter emits the spec’s content-type key (content map key in requestBody/responses) verbatim into a Refit [Headers("Accept: <ct>", "Content-Type: <ct>")] 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.
The malicious input is a content-type KEY such as: content: { ‘application/’: {schema} }.
No --skip-validation is required.
References
- github.com/advisories/GHSA-p32v-8v8j-j534
- github.com/christianhelle/refitter/commit/ab4d8e439d6f0ee82ad49ee15323978d70fe5a67
- github.com/christianhelle/refitter/pull/1178
- github.com/christianhelle/refitter/releases/tag/2.1.2
- github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534
- github.com/user-attachments/files/29394848/reproduce.sh
- github.com/user-attachments/files/29394851/maintainer-report.txt
- github.com/user-attachments/files/29394853/make_spec.py
- nvd.nist.gov/vuln/detail/CVE-2026-63344
Code Behaviors & Features
Detect and mitigate CVE-2026-63344 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →