/

CVE-2026-59765

Severity:

HIGH RISK

(7.5)

SSRF (CWE-918) in Migration Asset Download Handler

CVE-2026-59765

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized access to internal resources and cloud metadata

Severity:

HIGH RISK

(7.5)

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

A server-side request forgery vulnerability in migration asset downloads can bypass host-matching protections when the application retrieves attacker-influenced resources. Under deployments that permit control over migration asset locations, an attacker may access internal files, cloud metadata services, or other reachable network endpoints.

Affected context

The issue occurs in migration workflows that download assets from URLs or other remotely specified locations. It becomes risky when the download mechanism relies on host-matching controls that can be bypassed, and when the runtime can reach internal services, local files, or cloud metadata endpoints.

Exploit preconditions

  • Attack surface: Migration asset download functionality
  • Required access: Ability to influence, submit, or modify a migration asset location, subject to application authorization
  • Trigger point: Server-side retrieval of the migration asset
  • Why exploitation is possible: Host validation does not reliably constrain the final destination, allowing requests to reach unintended internal or local resources

Why this happens

The vulnerability is caused by insufficient destination validation in a server-side request workflow. A host matcher may validate an initial or canonical-looking hostname without reliably accounting for redirects, alternate address representations, URL parsing differences, or the final connection target. This maps to CWE-918: Server-Side Request Forgery, where attacker-influenced server requests can cross intended network trust boundaries.

Potential impact

  • Attackers may read cloud instance metadata
  • Attackers could obtain temporary credentials or other sensitive configuration
  • Internal service responses may be exposed
  • Local or mounted files may be disclosed
  • Internal network reconnaissance may become possible
  • A compromised identity could enable follow-on access to cloud or application resources

General mitigation guidance

Mitigation generally focuses on making outbound resource retrieval explicit, constrained, and independent of attacker-controlled destinations.

Common defensive patterns include:

  • Prefer an allowlist of approved origins and resource identifiers over flexible host matching
  • Validate the complete URL and resolved destination before connection
  • Re-check destinations across redirects and DNS resolution changes
  • Restrict outbound network access from migration workers using egress policies
  • Block access to loopback, link-local, private, and platform-metadata address ranges where appropriate
  • Use dedicated, least-privileged identities for migration operations
  • Avoid exposing raw downloaded responses or detailed network errors to untrusted callers
  • Prefer trusted artifact stores or server-selected asset references instead of arbitrary URLs

How teams detect issues like this

Detection approaches can include:

  • Static analysis for server-side HTTP clients using user-controlled URLs
  • Code review checks for hostname-only validation, redirect handling, DNS rebinding exposure, and permissive URL parsing
  • Tests covering private addresses, alternate IP forms, redirects, local file schemes, and cloud metadata endpoints
  • Network monitoring for migration workers making requests to internal, link-local, or metadata destinations
  • Egress policy enforcement and alerts for unexpected outbound connections
  • Automated security review tools that identify SSRF-prone data flows

Sources

SourceLink
blog.gitea.comblog.gitea.com/gitea-1.27.0-is-released/
github.comgithub.com/go-gitea/gitea/releases/tag/v1.27.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-2wm4-vwp6-v7xc

Frequently asked

questions

Potentially. Exploitation may be remote when an attacker can influence migration asset locations through an exposed or authorized application workflow.

Not necessarily. The key requirement is the ability to cause the server-side migration component to process a chosen or manipulated destination.

Use server-controlled asset references or a strict origin allowlist, validate the final connection destination, and enforce outbound network restrictions.

Treat all externally influenced URLs as untrusted, test redirect and DNS edge cases, apply least-privilege network access, and monitor migration workers for unexpected internal requests.

Find out what's already
exploitable in your codebase.