CVE-2026-63344: Refitter Refitter Allows Arbitrary Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-p32v-8v8j-j534
CWE-116 CWE-94
Published
Advisory Summary

CVE-2026-63344 is a CRITICAL refitter allows arbitrary code execution vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Refitter libraries in the NuGet ecosystem. The issue involves refitter allows arbitrary code execution through unescaped openapi content-type values. Remediation is available by upgrading affected packages to version 2.1.2.

CVE-2026-63344 at a Glance

CVE Identifier CVE-2026-63344
GHSA Identifier GHSA-p32v-8v8j-j534
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Refitter
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix CVE-2026-63344

To remediate this vulnerability, upgrade all affected Refitter dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Refitter fixed: 2.1.2
Upgrade Refitter to 2.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Refitter

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-63344, inspect your project dependencies for Refitter:

inspect dependencies for Refitter

Analyze the terminal output to locate any version of Refitter in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Refitter, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary 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/<breakout>': {schema} }. No `--skip-validation` is required. ### 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. [reproduce.sh](https://github.com/user-attachments/files/29394848/reproduce.sh) [maintainer-report.txt](https://github.com/user-attachments/files/29394851/maintainer-report.txt) [make_spec.py](https://github.com/user-attachments/files/29394853/make_spec.py)

CVE-2026-63344 Affected Refitter Versions

1 component(s)
Fixed Versions:
2.1.2
Product / Package Ecosystem Affected Versions Fixed Version
Refitter
NuGet
< 2.1.2
2.1.2

References

Frequently Asked Questions

What is CVE-2026-63344?
CVE-2026-63344 is a security vulnerability in Refitter involving Refitter allows arbitrary code execution through unescaped OpenAPI content-type values under CWE-116: Improper Encoding or Escaping of Output.
Which Refitter versions are affected?
Affected versions include releases prior to 2.1.2 across affected packages: Refitter.
What version fixes CVE-2026-63344?
Upgrading to 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Refitter affected?
Yes, Refitter is affected in releases prior to 2.1.2. Upgrade your dependency to 2.1.2 or later.
What CWE is associated with CVE-2026-63344?
CVE-2026-63344 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check NuGet dependencies for CVE-2026-63344?
Run the dependency tree command: 'inspect dependencies for Refitter'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p32v-8v8j-j534",
  "modified" : "2026-11-20T00:06:52Z",
  "published" : "2026-11-20T00:06:52Z",
  "aliases" : [ "CVE-2026-63344" ],
  "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: <ct>\", \"Content-Type: <ct>\")]` 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/<breakout>': {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)",
  "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Refitter"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  } ],
  "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"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-20T00:06:52Z",
    "nvd_published_at" : "2026-10-30T23:17:13Z"
  }
}