# CVE-2026-63346: Refitter allows code execution through unescaped OpenAPI header parameter names

- **Severity:** CRITICAL 9.3
- **CVSS:** 9.3 (v4.0, GitHub) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.62% (percentile 44, 2026-11-29)
- **CWE:** CWE-94, CWE-116
- **Aliases:** GHSA-58x9-vjvp-6mx8
- **Published:** 2026-11-20T00:06:28.000Z
- **Modified:** 2026-11-20T00:06:31.000Z

## Who should check

- Projects that depend on NuGet package Refitter (\< 2.1.2)

## Description

\#\#\# Summary

Refitter emits the spec's header parameter name (parameters\[\].name with in: header) verbatim into a Refit \`\[Header("\<name\>")\]\` 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 attacker-controlled or attacker-influenced OpenAPI description. Estimated Critical, e.g.
\`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).

\#\#\# Suggested fix

Escape every spec-derived string before emitting it into a Refit attribute (escape \`"\`, \`\\\`,
reject newlines) and validate characters. We recommend auditing all attribute emissions that embed
spec-derived values, using one shared encoder.
\[maintainer-report.txt\](https://github.com/user-attachments/files/29395048/maintainer-report.txt)
\[make\_spec.py\](https://github.com/user-attachments/files/29395050/make\_spec.py)
\[reproduce.sh\](https://github.com/user-attachments/files/29395051/reproduce.sh)

## Affected and fixed versions

- NuGet `Refitter`: affected \< 2.1.2; fixed 2.1.2 (ghsa)

## Technologies

NuGet packages

## Mitigation

- Upgrade Refitter to 2.1.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-63346. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-63346.md
Affected: Refitter < 2.1.2
Fixed in: 2.1.2

Steps:
1. Search this machine and project for Refitter (NuGet): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-63346 being exploited?

There is no confirmed exploitation: CVE-2026-63346 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.62% chance of exploitation in the next 30 days (as of 2026-11-29).

### How serious is CVE-2026-63346?

Critical: CVSS 9.3 (v4.0, scored by GitHub). Remote, no login needed.

### Which versions are affected by CVE-2026-63346?

Refitter \< 2.1.2.

### Is there a fix for CVE-2026-63346?

Yes. Fixed in 2.1.2. Upgrade Refitter to 2.1.2 or later.

### How do I check if I'm affected by CVE-2026-63346?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/christianhelle/refitter/security/advisories/GHSA-58x9-vjvp-6mx8>
- patch: <https://github.com/christianhelle/refitter/pull/1178>
- patch: <https://github.com/christianhelle/refitter/commit/63a19b03699a9c267d6fab5f758ec26484db83a1>
- other: <https://nvd.nist.gov/vuln/detail/CVE-2026-63346>
- other: <https://github.com/christianhelle/refitter/releases/tag/2.1.2>
- other: <https://github.com/user-attachments/files/29395048/maintainer-report.txt>
- other: <https://github.com/user-attachments/files/29395050/make_spec.py>
- other: <https://github.com/user-attachments/files/29395051/reproduce.sh>
- other: <https://github.com/advisories/GHSA-58x9-vjvp-6mx8>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- GitHub Advisory Database: CC-BY 4.0 <https://github.com/advisories/GHSA-58x9-vjvp-6mx8> (license: <https://creativecommons.org/licenses/by/4.0/>)
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-63346> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-63346>
