CVE-2026-63345: Refitter allows arbitrary code execution through unescaped OpenAPI paths
Refitter emits each OpenAPI path (the paths-object key) verbatim into a Refit [Get("<path>")]
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.
References
- github.com/advisories/GHSA-3fhm-p725-h3g3
- github.com/christianhelle/refitter/commit/793d2632899c2022511dfc15e30725ef69073973
- github.com/christianhelle/refitter/pull/1178
- github.com/christianhelle/refitter/releases/tag/2.1.2
- github.com/christianhelle/refitter/security/advisories/GHSA-3fhm-p725-h3g3
- github.com/user-attachments/files/29395228/maintainer-report.txt
- github.com/user-attachments/files/29395229/make_spec.py
- github.com/user-attachments/files/29395230/reproduce.sh
- nvd.nist.gov/vuln/detail/CVE-2026-63345
Code Behaviors & Features
Detect and mitigate CVE-2026-63345 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →