Skip to content
Threat Brief

← All advisories

CVE-2026-63345

Critical 9.3No known exploitationFix available

Refitter allows arbitrary code execution through unescaped OpenAPI paths

Vendor advisory: GHSA-3fhm-p725-h3g3

Record last updated

CVSS score

9.3

Critical on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

None

No EPSS score available

CISA remediation deadline

None

Not in the KEV catalog

Description

### Summary Refitter emits each OpenAPI path (the paths-object key) verbatim into a Refit `[Get(" ")]` attribute string, without escaping `"` or restricting characters. A crafted single-line, /-prefixed path survives Refitter's default OpenAPI validation yet closes the attribute string and the enclosing interface + namespace, injects a top-level `file class` with a `[ModuleInitializer]` method, and reopens a namespace + interface so the file stays valid. .NET runs `[ModuleInitializer]` methods when the generated assembly is loaded, so the attacker's code executes at application startup. Verified on Refitter 2.0.0 / .NET 8. ### Details ``` [Get("/p")] Task Dummy(); } } file class Evil { [System.Runtime.CompilerServices.ModuleInitializer] internal static void Init(){ /* attacker code */ } } namespace N2 { public partial interface I2 { [Get("/q")] Task GetU(string id); } } ``` No `--skip-validation` is needed (the payload is a valid single-line path). The generated `.cs` is compiled into the victim application; the module initializer runs at assembly load. This is distinct from the value sinks (enum/default), which are escaped; the path sink has no escaping. The `[Header(" ")]` attri…

Weakness: CWE-94, CWE-1116

Patching and mitigation

Patch status
Fix available (source: GitHub Advisory Database)
Fix documented (source date)
Mitigation
None documented
Vendor guidance
github.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
nugetRefitterall versions before 2.1.22.1.2GitHub Advisory Database

Timeline

  1. Patch

    Fix documented by GitHub Advisory Database

    Source: GitHub Advisory Database (opens in a new tab)

Vendor guidance and references