CVE-2026-63184
JSON

7.1high

Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion

Severity
7.1high CVSS:3.1 by GitHub_M
Exploit likelihood
0.64% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x6w4-f264-3vvr

Description

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.

Affected

Product or packageVersionsReported by
christianhelle refitter< 2.1.1CVE List
Refitter (NuGet)before 2.1.1GitHub Advisory Database

All scores

GitHub_M7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
GitHub7.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

Classification

CWE-829CWE-918

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Summary

Refitter (the refitter dotnet tool, built on NJsonSchema for $ref resolution) fetches remote http(s) URLs and reads local files (including absolute paths and ../ traversal outside the input directory), inlining the referenced schema into the generated Refit interface/contracts. Running refitter <spec> --output Out.cs on a spec whose $ref points at an attacker/internal URL or an arbitrary local file yields SSRF, remote file inclusion, and local file inclusion. Verified on Refitter 2.0.0.

Details
  • $ref: http://attacker-or-internal/evil.json#/... -> build host fetches (SSRF) and inlines the remote schema (RFI); confirmed property REMOTE_REFIT_PROP.
  • $ref: /abs/path.json#/... or ../../secret.json#/... -> out-of-tree local file read + inlined (LFI); confirmed property REFIT_LFI_MARKER. Both absolute and relative traversal work.

No RCE: Refitter emits Refit interfaces with no baseUrl string literal (Refit sets the base address at runtime), enum values use C# verbatim-string doubling, and string defaults are escaped. The chain stops at SSRF + RFI + LFI.

The $ref resolution is performed by Refitter's NJsonSchema dependency, which Refitter ships and invokes with these unsafe defaults.

PoC

reproduce.sh (+ make_spec.py, listener.py) attached: installs the .NET SDK + Refitter if needed, confirms LFI (out-of-tree read), SSRF (listener hit during generation), and RFI (remote schema inlined). Verified on 2.0.0.

Impact

Build-time SSRF (CWE-918) from the developer or CI host, disclosure of arbitrary local files (CWE-22), and inclusion of untrusted remote content (CWE-829), from running Refitter on an attacker-controlled or attacker-influenced OpenAPI description. No code execution. Estimated Medium-High, e.g. [reproduce.sh](https://github.com/user-attachments/files/29395269/reproduce.sh) (the CNA sets the final score).

Suggested fix

Don't resolve remote $refs by default (opt-in + host allowlist); confine local $ref resolution to the input directory tree (reject absolute paths and ../ escapes). Apply at all nesting levels. Coordinate with NJsonSchema, where the resolver lives. maintainer-report.txt advisory.md reproduce.sh maintainer-report.txt advisory.md listener.py make_spec.py

References

https://github.com/christianhelle/refitter/security/advisories/GHSA-x6w4-f264-3vvrexploit, web
https://github.com/christianhelle/refitter/pull/1173web
https://github.com/christianhelle/refitter/commit/6ad20a3803561225100b0a4bb6b12f947d23db7bweb
https://github.com/christianhelle/refitter/releases/tag/2.1.1web
https://github.com/user-attachments/files/29395269/reproduce.shweb
https://github.com/user-attachments/files/29395271/maintainer-report.txtweb
https://github.com/user-attachments/files/29395272/advisory.mdweb
https://github.com/user-attachments/files/29395283/reproduce.shweb
https://github.com/user-attachments/files/29395284/maintainer-report.txtweb
https://github.com/user-attachments/files/29395285/advisory.mdweb
https://github.com/user-attachments/files/29395286/listener.pyweb
https://github.com/user-attachments/files/29395288/make_spec.pyweb

Sources

SourceRecordLicence
CVE ListCVE-2026-63184 changed 2026-11-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-x6w4-f264-3vvr changed 2026-11-20CC-BY-4.0
NVDCVE-2026-63184 changed 2026-11-02Public domain