/

CVE-2026-63184

Severity:

HIGH RISK

(7.1)

Untrusted $ref Resolution (CWE-829) in Refitter Tool

CVE-2026-63184

Deferred

Vulnerability type

Category:

Untrusted Resource Inclusion

CWE:

CWE-829, CWE-918

Impact:

Server-Side Request Forgery and File Disclosure

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Refitter may resolve attacker-controlled or attacker-influenced OpenAPI $ref values using unsafe defaults during C# client generation. Remote references can cause requests from a developer or CI host, while local and traversal-based references may disclose files accessible to that host.

Refitter may resolve attacker-controlled or attacker-influenced OpenAPI $ref values using unsafe defaults during C# client generation. Remote references can cause requests from a developer or CI host, while local and traversal-based references may disclose files accessible to that host.

Affected context

The issue can occur when the Refitter dotnet tool generates Refit interfaces or contracts from OpenAPI descriptions that contain untrusted or externally influenced references. Risk increases when the generation process runs on a developer workstation or CI host with network access and readable local files, and when $ref resolution permits remote URLs, absolute paths, or paths outside the intended input directory.

The issue can occur when the Refitter dotnet tool generates Refit interfaces or contracts from OpenAPI descriptions that contain untrusted or externally influenced references. Risk increases when the generation process runs on a developer workstation or CI host with network access and readable local files, and when $ref resolution permits remote URLs, absolute paths, or paths outside the intended input directory.

Exploit preconditions

  • Attack surface: OpenAPI description processing during client and contract generation
  • Required access: Ability to provide or influence the OpenAPI document or referenced schema content
  • Trigger point: $ref resolution performed by the schema-generation pipeline
  • Why exploitation is possible: Unsafe reference handling may fetch remote resources or read local paths before the resulting content is incorporated into generated output
  • Environmental dependency: The developer or CI host must be able to reach the referenced network destination or read the targeted local file
  • Attack surface: OpenAPI description processing during client and contract generation
  • Required access: Ability to provide or influence the OpenAPI document or referenced schema content
  • Trigger point: $ref resolution performed by the schema-generation pipeline
  • Why exploitation is possible: Unsafe reference handling may fetch remote resources or read local paths before the resulting content is incorporated into generated output
  • Environmental dependency: The developer or CI host must be able to reach the referenced network destination or read the targeted local file

Why this happens

The underlying issue is insufficient restriction of external resource resolution in a schema-processing workflow. References supplied through an OpenAPI document are treated as resolvable locations without adequately limiting network access, filesystem scope, or path traversal. This maps primarily to CWE-829: Inclusion of Functionality from Untrusted Control Sphere, with CWE-918: Server-Side Request Forgery applying when remote references cause server-side requests.

The underlying issue is insufficient restriction of external resource resolution in a schema-processing workflow. References supplied through an OpenAPI document are treated as resolvable locations without adequately limiting network access, filesystem scope, or path traversal. This maps primarily to CWE-829: Inclusion of Functionality from Untrusted Control Sphere, with CWE-918: Server-Side Request Forgery applying when remote references cause server-side requests.

Potential impact

  • A developer or CI host may send requests to attacker-selected network locations
  • Internal services or metadata endpoints could be probed from the generation environment
  • Local files readable by the generation process may be disclosed
  • Untrusted remote schema content could be incorporated into generated interfaces or contracts
  • Sensitive information may be exposed through generated artifacts, logs, or build outputs
  • CI confidentiality and supply-chain integrity could be weakened
  • A developer or CI host may send requests to attacker-selected network locations
  • Internal services or metadata endpoints could be probed from the generation environment
  • Local files readable by the generation process may be disclosed
  • Untrusted remote schema content could be incorporated into generated interfaces or contracts
  • Sensitive information may be exposed through generated artifacts, logs, or build outputs
  • CI confidentiality and supply-chain integrity could be weakened

General mitigation guidance

Mitigation generally focuses on treating all OpenAPI references as untrusted and restricting resolution by default.

Common defensive patterns include:

  • Disable remote reference resolution unless it is explicitly required
  • Permit only approved schemes, hosts, and repositories through an allowlist
  • Constrain local resolution to a dedicated input directory and reject absolute paths or traversal outside that directory
  • Validate and normalize references before attempting resolution
  • Use isolated, least-privileged build environments with restricted network egress and filesystem access
  • Separate generated artifacts from sensitive workspace files and credentials
  • Prefer pinned, integrity-checked schema sources and review generated changes

Mitigation generally focuses on treating all OpenAPI references as untrusted and restricting resolution by default.

Common defensive patterns include:

  • Disable remote reference resolution unless it is explicitly required
  • Permit only approved schemes, hosts, and repositories through an allowlist
  • Constrain local resolution to a dedicated input directory and reject absolute paths or traversal outside that directory
  • Validate and normalize references before attempting resolution
  • Use isolated, least-privileged build environments with restricted network egress and filesystem access
  • Separate generated artifacts from sensitive workspace files and credentials
  • Prefer pinned, integrity-checked schema sources and review generated changes

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and code review checks for unrestricted $ref resolution
  • Tests containing remote URLs, absolute paths, and traversal-style references
  • Build-policy rules that prohibit unexpected outbound requests during code generation
  • Network monitoring for CI or developer tools contacting unapproved destinations
  • File-access monitoring for schema generators reading outside designated input directories
  • Review of generated artifacts for unexpected external content or sensitive data

Automated security review tools may help flag unrestricted URL handling, filesystem access, and missing allowlists.

Organizations can identify this class of issue through:

  • Static analysis and code review checks for unrestricted $ref resolution
  • Tests containing remote URLs, absolute paths, and traversal-style references
  • Build-policy rules that prohibit unexpected outbound requests during code generation
  • Network monitoring for CI or developer tools contacting unapproved destinations
  • File-access monitoring for schema generators reading outside designated input directories
  • Review of generated artifacts for unexpected external content or sensitive data

Automated security review tools may help flag unrestricted URL handling, filesystem access, and missing allowlists.

Sources

SourceLink
github.comgithub.com/christianhelle/refitter/commit/6ad20a3803561225100b0a4bb6b12f947d23db7b
github.comgithub.com/christianhelle/refitter/pull/1173
github.comgithub.com/christianhelle/refitter/releases/tag/2.1.1
github.comgithub.com/christianhelle/refitter/security/advisories/GHSA-x6w4-f264-3vvr
github.comgithub.com/user-attachments/files/29395269/reproduce.sh
github.comgithub.com/user-attachments/files/29395271/maintainer-report.txt
github.comgithub.com/user-attachments/files/29395272/advisory.md
github.comgithub.com/user-attachments/files/29395283/reproduce.sh
github.comgithub.com/user-attachments/files/29395284/maintainer-report.txt
github.comgithub.com/user-attachments/files/29395285/advisory.md
github.comgithub.com/user-attachments/files/29395286/listener.py
github.comgithub.com/user-attachments/files/29395288/make_spec.py

Frequently asked

questions

It is not necessarily a direct network-service vulnerability. An attacker generally must influence an OpenAPI description or referenced schema that a developer or CI process later consumes.

The attacker needs a path to modify, supply, or cause the processing of OpenAPI content. The generation environment must also have network reachability or filesystem permissions relevant to the referenced resources.

Disable untrusted remote and unrestricted local $ref resolution by default. Where references are required, enforce strict scheme, host, directory, and content allowlists.

Run generators with least privilege, restrict outbound network access, isolate build workspaces, validate reference paths, and monitor generated builds for unexpected network or filesystem activity.

It is not necessarily a direct network-service vulnerability. An attacker generally must influence an OpenAPI description or referenced schema that a developer or CI process later consumes.

The attacker needs a path to modify, supply, or cause the processing of OpenAPI content. The generation environment must also have network reachability or filesystem permissions relevant to the referenced resources.

Disable untrusted remote and unrestricted local $ref resolution by default. Where references are required, enforce strict scheme, host, directory, and content allowlists.

Run generators with least privilege, restrict outbound network access, isolate build workspaces, validate reference paths, and monitor generated builds for unexpected network or filesystem activity.

Find out what's already
exploitable in your codebase.