Loading advisory.
Loading advisory.
Refitter allows arbitrary code execution through unescaped OpenAPI content-type values
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 ".
Published 2026-10-30 22:15 UTC · Modified 2026-11-20 00:15 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| Refitter | NuGet | < 2.1.2 versions 0.1.2-alpha, 0.1.3-alpha, 0.1.4-alpha, 0.1.5-alpha, 0.2.0-alpha, 0.2.1-alpha, 0.2.2-alpha, 0.2.3-alpha, 0.2.4-alpha, 0.3.0, 0.3.1, 0.3.16, 0.3.17, 0.3.2, 0.3.3, 0.3.4, 0.4.0, 0.4.1, 0.4.2, 0.5.0 and 92 more | 2.1.2 | dotnet add package Refitter --version 2.1.2 |
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.
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.
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).
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
maintainer-report.txt
make_spec.py
Exploit code or a detection template for this CVE is published by the sources below. This is not a report of use against real systems (that is what CISA KEV records) and it does not change the tier.
EPSS went from 0.006 on 2026-11-24 to 0.006 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.006 | first score | v2026.06.15 |
| 2026-11-26 | 0.006 | 0.006 | v2026.06.15 |