High

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

  • Disclosed: 20.11.2026
  • Updated: 23.11.2026 00:10

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

What to do

Upgrade Refitter to version 2.1.1 or later.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
.NET (NuGet) Refitter < 2.1.1 2.1.1

References

CVSS score 7.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Weakness (CWE)
CWE-829, CWE-918
Platform
.NET (NuGet)
Package
Refitter
Disclosed
20.11.2026
Updated
23.11.2026 00:10

Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.

OSV / GitHub Advisory Database - GHSA-x6w4-f264-3vvr - CC BY 4.0

Vulnerability history: Refitter

All published vulnerabilities of this package (.NET (NuGet)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
11.2026 11.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 3
  • High 1

Disclosures per year

  1. 2026: 4
  1. Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion this entry
    High · 7.1 CVE-2026-63184 < 2.1.1 2.1.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.