HIGH · CVSS 3.1 7.1 EPSS 0.7% · 50th percentile CWE-829CWE-918

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

Published 2026-11-20 · Updated 2026-11-20 · Also known as GHSA-x6w4-f264-3vvr

Summary

The Refitter .NET tool suffers from insecure OpenAPI $ref resolution, allowing unauthorized local file access and SSRF during the build process. Engineering teams using versions prior to 2.1.1 should update immediately to mitigate these build-time vulnerabilities.

Who is affected

Refitter processes untrusted OpenAPI specifications by fetching remote URLs or reading arbitrary local files referenced in the schema. This results in SSRF, remote file inclusion, and local file inclusion when the tool is run on malicious or attacker-influenced specification files. While code execution is not possible, this allows attackers to exfiltrate sensitive files from build environments or perform requests from the CI host.

Exploitability

The vulnerability carries a high CVSS base score of 7.1, indicating significant risk, although the low EPSS score of 0.004 suggests limited current threat activity. It is not listed on the CISA Known Exploited Vulnerabilities catalog and does not currently have evidence of active exploitation.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-20. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
NuGet Refitter >= 0, < 2.1.1 2.1.1 dotnet add package Refitter --version 2.1.1

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityHigh
IntegrityLow
AvailabilityNone

FAQ

Does this vulnerability lead to Remote Code Execution (RCE)?

No, the vulnerability is limited to SSRF, remote file inclusion, and local file inclusion. The tool generates Refit interfaces that do not permit code execution.

Is my production server at risk?

This is primarily a build-time vulnerability. The risk is to the developer workstation or the CI/CD build environment where the Refitter tool is executed.

What is the root cause of the issue?

The tool uses the NJsonSchema library with unsafe default configurations that permit resolution of external network references and absolute local file paths without path validation.

Original advisory description
### 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 `$ref`s 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](https://github.com/user-attachments/files/29395271/maintainer-report.txt) [advisory.md](https://github.com/user-attachments/files/29395272/advisory.md) [reproduce.sh](https://github.com/user-attachments/files/29395283/reproduce.sh) [maintainer-report.txt](https://github.com/user-attachments/files/29395284/maintainer-report.txt) [advisory.md](https://github.com/user-attachments/files/29395285/advisory.md) [listener.py](https://github.com/user-attachments/files/29395286/listener.py) [make_spec.py](https://github.com/user-attachments/files/29395288/make_spec.py)

References

Source records: GHSA-x6w4-f264-3vvr (OSV.dev) · EPSS by FIRST, 2026-11-26.