GHSA-x6w4-f264-3vvr: Refitter: Unrestricted OpenAPI references permit build-host SSRF and file inclusion

Published Oct 30, 2026
·
Updated

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.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade refitter to a version that resolves this vulnerability.

    Fixed in 2.1.1

Event History

Oct 30, 2026
CVE Published
via OSV·09:49 PM
Data Sourced
via OSV·09:49 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Developers and CI systems are exposed when they run the refitter dotnet tool on OpenAPI descriptions that an attacker controls or can influence. The vulnerable behavior is in build-time schema resolution, so the affected host is the developer or CI host running generation.

2

What does an attacker need to exploit it?

An attacker needs to supply or influence an OpenAPI description containing $ref values. Those references can point to remote HTTP(S) resources, absolute local file paths, or relative paths using ../ traversal outside the input directory.

3

What can exploitation do?

Remote references can make requests from the build host and inline remote schema content into generated output. Local references can resolve and inline arbitrary local file content; the demonstrated impact does not include code execution.

4

Are default settings affected?

Yes. Versions before 2.1.1 invoke NJsonSchema with unsafe defaults for $ref resolution, so no separate unsafe configuration is required.

5

What should teams do if they cannot upgrade immediately?

Do not run the tool on untrusted or attacker-influenced OpenAPI descriptions. Restrict inputs so that $ref values cannot reach remote URLs, absolute local paths, or traversal paths outside the intended input directory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203