{"vuln_id":"CVE-2026-63346","aliases":["GHSA-58x9-vjvp-6mx8"],"description":"Refitter allows code execution through unescaped OpenAPI header parameter names","published_at":"2026-11-20T00:06:28Z","modified_at":"2026-11-20T00:06:31Z","first_seen_at":"2026-11-21T19:15:19.334684Z","severity":"critical","severity_source":"ghsa","cvss_score":9.3,"cvss_vector":"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","cwe":["CWE-94","CWE-116"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00568,"epss_percentile":0.47948,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-63346"},"matched_alias":null,"items":[{"id":2342,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-58x9-vjvp-6mx8 / CVE-2026-63346: Refitter allows code execution through unescaped OpenAPI header parameter names","summary":"Refitter allows code execution through unescaped OpenAPI header parameter names\n\n### Summary\n\nRefitter emits the spec's header parameter name (parameters[].name with in: header) verbatim into a Refit `[Header(\"\n\")]` 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\nNotable: the breakout starts from a PARAMETER-LIST position (it closes the params and method first).\nThe malicious input is a header parameter name. No `--skip-validation` is required. The query\n`AliasAs` and value sinks (enum, default) are escaped; the gap is in the attribute-string emission.\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[maintainer-report.txt](https://github.com/user-attachments/files/29395048/maintainer-report.txt)\n[make_spec.py](https://github.com/user-attachments/files/29395050/make_spec.py)\n[reproduce.sh](https://github.com/user-attachments/files/29395051/reproduce.sh)\n\nAffected packages: nuget:Refitter\nPatched: Refitter 2.1.2","url":"https://github.com/advisories/GHSA-58x9-vjvp-6mx8","published_at":"2026-11-20T00:06:28Z","updated_at":"2026-11-20T00:06:31Z","fetched_at":"2026-11-21T19:15:18.416764Z","severity":"critical","cvss_score":9.3,"epss":0.00568,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"Refitter","vuln_id":"CVE-2026-63346","vuln_ids":["CVE-2026-63346","GHSA-58X9-VJVP-6MX8"],"tags":["ghsa","nuget","CWE-94","CWE-116"],"cluster_id":2116,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2342","html":"https://vulnwatch.ve1ve2.com/item/2342"}}]}