{"id":"GHSA-p32v-8v8j-j534","summary":"Refitter allows arbitrary code execution through unescaped OpenAPI content-type values","details":"### Summary\n\nRefitter emits the spec's content-type key (content map key in requestBody/responses) verbatim into a Refit `[Headers(\"Accept: \u003cct\u003e\", \"Content-Type: \u003cct\u003e\")]` attribute string without escaping\n`\"`. A crafted value survives Refitter's default OpenAPI validation, breaks out of the attribute and\nthe enclosing interface + namespace, injects a top-level `file class` with a `[ModuleInitializer]`\nmethod, and reopens so the file stays valid. .NET runs `[ModuleInitializer]` methods at assembly\nload, so the attacker's code executes at application startup. Verified on Refitter 2.0.0 / .NET 8.\n\nThe malicious input is a content-type KEY such as: content: { 'application/\u003cbreakout\u003e': {schema} }.\nNo `--skip-validation` is required.\n\n### PoC\n\n`reproduce.sh` (+ `make_spec.py`) attached: generates with default validation, compiles into a\nconsole app, runs it (Main does not touch the client), and shows a marker written at assembly load.\n\n### Impact\n\nCode execution at assembly load (process startup) in any application that compiles a Refitter client\ngenerated from an attacker-controlled or attacker-influenced OpenAPI description. Estimated Critical, e.g.\n`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` (the CNA sets the final score).\n\n### Suggested fix\n\nEscape every spec-derived string before emitting it into a Refit attribute (escape `\"`, `\\`,\nreject newlines) and validate characters. We recommend auditing all attribute emissions that embed\nspec-derived values, using one shared encoder.\n[reproduce.sh](https://github.com/user-attachments/files/29394848/reproduce.sh)\n[maintainer-report.txt](https://github.com/user-attachments/files/29394851/maintainer-report.txt)\n[make_spec.py](https://github.com/user-attachments/files/29394853/make_spec.py)","aliases":["CVE-2026-63344"],"modified":"2026-11-20T00:15:09.558443827Z","published":"2026-11-20T00:06:52Z","database_specific":{"nvd_published_at":"2026-10-30T23:17:13Z","cwe_ids":["CWE-116","CWE-94"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2026-11-20T00:06:52Z"},"references":[{"type":"WEB","url":"https://github.com/christianhelle/refitter/security/advisories/GHSA-p32v-8v8j-j534"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63344"},{"type":"WEB","url":"https://github.com/christianhelle/refitter/pull/1178"},{"type":"WEB","url":"https://github.com/christianhelle/refitter/commit/ab4d8e439d6f0ee82ad49ee15323978d70fe5a67"},{"type":"PACKAGE","url":"https://github.com/christianhelle/refitter"},{"type":"WEB","url":"https://github.com/christianhelle/refitter/releases/tag/2.1.2"},{"type":"WEB","url":"https://github.com/user-attachments/files/29394848/reproduce.sh"},{"type":"WEB","url":"https://github.com/user-attachments/files/29394851/maintainer-report.txt"},{"type":"WEB","url":"https://github.com/user-attachments/files/29394853/make_spec.py"}],"affected":[{"package":{"name":"Refitter","ecosystem":"NuGet","purl":"pkg:nuget/Refitter"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.2"}]}],"versions":["0.1.2-alpha","0.1.3-alpha","0.1.4-alpha","0.1.5-alpha","0.2.0-alpha","0.2.1-alpha","0.2.2-alpha","0.2.3-alpha","0.2.4-alpha","0.3.0","0.3.1","0.3.16","0.3.17","0.3.2","0.3.3","0.3.4","0.4.0","0.4.1","0.4.2","0.5.0","0.5.1","0.5.2","0.5.25","0.5.26","0.5.27","0.5.28","0.5.29","0.5.3","0.5.30","0.6.0","0.6.1","0.6.2","0.6.3","0.7.0","0.7.0.20-preview","0.7.0.21-preview","0.7.0.22-preview","0.7.0.23-preview","0.7.0.26-preview","0.7.0.27-preview","0.7.0.28-preview","0.7.1","0.7.1.29-preview","0.7.1.30-preview","0.7.1.31-preview","0.7.2","0.7.2.32-preview","0.7.3","0.7.3.33-preview","0.7.3.34-preview","0.7.3.35-preview","0.7.3.36-preview","0.7.3.37-preview","0.7.4","0.7.5","0.8.0","0.8.1","0.8.2","0.8.3","0.8.4","0.8.5","0.8.6","0.8.6.38-preview","0.8.6.39-preview","0.8.7","0.8.7.40-preview","0.8.7.41-preview","0.9.0","0.9.1","0.9.2","0.9.3.42-preview","0.9.4","0.9.4.43-preview","0.9.5","0.9.6","0.9.7","0.9.8","0.9.9","0.9.9.44-preview","1.0.0","1.0.1","1.0.2","1.1.0.45-preview","1.1.1","1.1.2","1.1.3","1.2.0","1.3.0","1.3.1","1.3.2","1.4.0","1.4.1","1.5.0","1.5.1","1.5.2","1.5.3","1.5.4","1.5.5","1.5.6","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","1.7.0","1.7.1","1.7.2","1.7.3","2.0.0","2.1.0","2.1.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-p32v-8v8j-j534/GHSA-p32v-8v8j-j534.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}