Code injection in Refitter C# client generator via OpenAPI path keys
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-94.
Summary
Refitter before 2.1.2 copies OpenAPI paths keys verbatim into Refit route attributes without escaping quotation marks (CWE-94). A remote attacker who influences the OpenAPI document can inject C# code into the generated client. A module initializer in the injected code runs when an application compiles and loads the generated assembly at startup, even if the client is never called.
Written with Claude Haiku 5.5 from the sources below · 2026-11-05
Description from the CNA
Refitter is a tool for generating a C# REST API client using the Refit library. Prior to 2.1.2, OpenAPI `paths`-object keys are emitted verbatim into Refit route attributes such as `[Get("<path>")]` without escaping quotation marks or restricting characters. An attacker-influenced single-line, slash-prefixed path survives default validation without `--skip-validation` and can close the attribute string, interface, and namespace while introducing a top-level file class and reopening the generated structure to keep valid C#. A `[ModuleInitializer]` method executes attacker code when an application compiles and loads the generated assembly at startup, even without calling the generated client. The enum and default value sinks are escaped and are not the vulnerable path-emission sink. The behavior was verified on Refitter 2.0.0 with .NET 8. This issue is fixed in version 2.1.2.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| christianhelle | refitter | before 2.1.2 | 2.1.2 | Patch available | CNA |
- refitter Vendorchristianhelle Affected before 2.1.2 Fixed in 2.1.2 Patch available CNA
Remediation
Upgrade Refitter to version 2.1.2.
Written with Claude Haiku 5.5 from the sources below · 2026-11-05
- Fix · CNA refitter (christianhelle) Fixed in 2.1.2
Timeline
- 2026-10-30 Threatist record created from CVE-2026-63345
- 2026-11-01 Priority changed: MEDIUM → LOW
- 2026-11-02 CISA SSVC decision points changed
References
Other 7
- https://github.com/christianhelle/refitter/security/advisories/GHSA-3fhm-p725-h3g3
- https://github.com/christianhelle/refitter/pull/1178
- https://github.com/christianhelle/refitter/commit/793d2632899c2022511dfc15e30725ef69073973
- https://github.com/christianhelle/refitter/releases/tag/2.1.2
- https://github.com/user-attachments/files/29395228/maintainer-report.txt
- https://github.com/user-attachments/files/29395229/make_spec.py
- https://github.com/user-attachments/files/29395230/reproduce.sh
More christianhelle vulnerabilities
- TI-2026-83435 Source injection in Refitter via OpenAPI header parameter names CVSS 4.0HIGH 8.6
- TI-2026-83433 Code injection in Refitter via OpenAPI content-type map keys CVSS 4.0HIGH 8.6
- TI-2026-83423 Refitter OpenAPI $ref handling enables SSRF and local file inclusion CVSS 3.1HIGH 7.1
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences