Skip to main content

CVE-2026-63346 — Vulnerability in Refitter — CVE Details

CRITICAL

Refitter allows code execution through unescaped OpenAPI header parameter names

Published November 20, 2026Updated November 20, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.62%). Schedule for your next planned update.

Does your project use an affected Refitter version?

Paste your packages.lock.json to check it for CVE-2026-63346 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my packages.lock.json

Summary

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 make_spec.py reproduce.sh

Advisory Timeline

  • First published November 20, 2026 (6 days ago).
  • Last revised November 20, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Refitter to 2.1.2 or later
dotnet add package Refitter --version 2.1.2

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: NuGet (1).

PackageFixed In
Refitter NuGet · Affected: 0.1.2-alpha, 0.1.3-alpha, 0.1.4-alpha, 0.1.5-alpha (+108 more)2.1.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-116
    Improper Encoding or EscapingMITRE
  • CWE-94
    Code InjectionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-63346?
Refitter allows code execution through unescaped OpenAPI header parameter names. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2026-63346?
CVE-2026-63346 affects Refitter. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-63346 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.62%
EPSS percentile: 43.8

This is a below-median EPSS score — only 43.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-58x9-vjvp-6mx8

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my packages.lock.json