{"id":"CVE-2026-63184","aliases":["CVE-2026-63184","GHSA-x6w4-f264-3vvr"],"related":[],"kind":"vulnerability","state":"published","title":"Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion","summary":"Refitter is a tool for generating a C# REST API client using the Refit library. Prior to 2.1.1, the `refitter` dotnet tool invokes `NJsonSchema` with unsafe defaults for `$ref` resolution when generating Refit interfaces and contracts from attacker-controlled or attacker-influenced OpenAPI descriptions. Remote `http(s)` references cause requests from the developer or CI host and inline untrusted remote schema content into generated output. Absolute local file paths and relative `../` traversal outside the input directory also resolve and inline local content, permitting arbitrary local-file disclosure. The demonstrated chain stops at server-side request forgery, remote file inclusion, and local file inclusion, not code execution: Refit sets the base URL at runtime, enum values use verbatim-string doubling, and string defaults are escaped. This issue is fixed in version 2.1.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Refitter is a tool for generating a C# REST API client using the Refit library. Prior to 2.1.1, the `refitter` dotnet tool invokes `NJsonSchema` with unsafe defaults for `$ref` resolution when generating Refit interfaces and contracts from attacker-controlled or attacker-influenced OpenAPI descriptions. Remote `http(s)` references cause requests from the developer or CI host and inline untrusted remote schema content into generated output. Absolute local file paths and relative `../` traversal outside the input directory also resolve and inline local content, permitting arbitrary local-file disclosure. The demonstrated chain stops at server-side request forgery, remote file inclusion, and local file inclusion, not code execution: Refit sets the base URL at runtime, enum values use verbatim-string doubling, and string defaults are escaped. This issue is fixed in version 2.1.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nRefitter (the `refitter` dotnet tool, built on NJsonSchema for `$ref` resolution) fetches remote\n`http(s)` URLs and reads local files (including absolute paths and `../` traversal outside the input\ndirectory), inlining the referenced schema into the generated Refit interface/contracts. Running\n`refitter <spec> --output Out.cs` on a spec whose `$ref` points at an attacker/internal URL or an\narbitrary local file yields SSRF, remote file inclusion, and local file inclusion. Verified on\nRefitter 2.0.0.\n\n### Details\n\n- `$ref: http://attacker-or-internal/evil.json#/...` -> build host fetches (SSRF) and inlines the\n  remote schema (RFI); confirmed property `REMOTE_REFIT_PROP`.\n- `$ref: /abs/path.json#/...` or `../../secret.json#/...` -> out-of-tree local file read + inlined\n  (LFI); confirmed property `REFIT_LFI_MARKER`. Both absolute and relative traversal work.\n\nNo RCE: Refitter emits Refit interfaces with no baseUrl string literal (Refit sets the base address at\nruntime), enum values use C# verbatim-string doubling, and string defaults are escaped. The chain\nstops at SSRF + RFI + LFI.\n\nThe `$ref` resolution is performed by Refitter's NJsonSchema dependency, which Refitter ships and\ninvokes with these unsafe defaults.\n\n### PoC\n\n`reproduce.sh` (+ `make_spec.py`, `listener.py`) attached: installs the .NET SDK + Refitter if needed,\nconfirms LFI (out-of-tree read), SSRF (listener hit during generation), and RFI (remote schema\ninlined). Verified on 2.0.0.\n\n### Impact\n\nBuild-time SSRF (CWE-918) from the developer or CI host, disclosure of arbitrary local files\n(CWE-22), and inclusion of untrusted remote content (CWE-829), from running Refitter on an\nattacker-controlled or attacker-influenced OpenAPI description. No code execution. Estimated\nMedium-High, e.g. `[reproduce.sh](https://github.com/user-attachments/files/29395269/reproduce.sh)` (the CNA sets the final score).\n\n### Suggested fix\n\nDon't resolve remote `$ref`s by default (opt-in + host allowlist); confine local `$ref` resolution to\nthe input directory tree (reject absolute paths and `../` escapes). Apply at all nesting levels.\nCoordinate with NJsonSchema, where the resolver lives.\n[maintainer-report.txt](https://github.com/user-attachments/files/29395271/maintainer-report.txt)\n[advisory.md](https://github.com/user-attachments/files/29395272/advisory.md)\n[reproduce.sh](https://github.com/user-attachments/files/29395283/reproduce.sh)\n[maintainer-report.txt](https://github.com/user-attachments/files/29395284/maintainer-report.txt)\n[advisory.md](https://github.com/user-attachments/files/29395285/advisory.md)\n[listener.py](https://github.com/user-attachments/files/29395286/listener.py)\n[make_spec.py](https://github.com/user-attachments/files/29395288/make_spec.py)","format":"markdown","source":"ghsa"}],"published":"2026-10-30T21:49:06.793Z","modified":"2026-11-20T14:45:04.540Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"rating":"HIGH"}],"cwes":["CWE-829","CWE-918"],"affected":[{"ranges":[{"version":"< 2.1.1","status":"affected"}],"vendor":"christianhelle","product":"refitter","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.1.1"}],"ecosystem":"NuGet","package":"Refitter","purl":"pkg:nuget/Refitter","source":"ghsa"}],"references":[{"url":"https://github.com/christianhelle/refitter/security/advisories/GHSA-x6w4-f264-3vvr","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/christianhelle/refitter/pull/1173","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/christianhelle/refitter/commit/6ad20a3803561225100b0a4bb6b12f947d23db7b","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/christianhelle/refitter/releases/tag/2.1.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395269/reproduce.sh","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395271/maintainer-report.txt","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395272/advisory.md","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395283/reproduce.sh","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395284/maintainer-report.txt","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395285/advisory.md","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395286/listener.py","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/user-attachments/files/29395288/make_spec.py","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63184","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/christianhelle/refitter","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-02T14:42:43.471Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-63184","url":"https://www.cve.org/CVERecord?id=CVE-2026-63184","licence":"CVE Terms of Use","modified":"2026-11-02T14:43:07.417Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x6w4-f264-3vvr","url":"https://github.com/advisories/GHSA-x6w4-f264-3vvr","licence":"CC-BY-4.0","modified":"2026-11-20T14:45:04.540Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-63184","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63184","licence":"Public domain","modified":"2026-11-02T19:35:33.347Z"}],"updatedAt":"2026-11-25T22:59:48.039Z","epss":{"score":0.00638,"percentile":0.51916,"date":"2026-12-01T12:00:22.000Z"}}