/

CVE-2026-58314

Severity:

HIGH RISK

(7.7)

Server-Side Request Forgery (CWE-918) in Gitea Integrations

CVE-2026-58314

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized server-side network access and potential exposure of internal resources

Severity:

HIGH RISK

(7.7)

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

Two server-side request forgery (SSRF) findings in Gitea 1.26.2 may allow a remote attacker to cause the server to make requests to attacker-chosen destinations. Risk increases when Gitea can reach internal services, cloud metadata endpoints, or other protected network resources.

Affected context

The issue occurs in Gitea 1.26.2 functionality that accepts or derives network destinations and then initiates outbound requests on behalf of the application. Exploitability depends on the affected request paths, validation controls, authentication requirements, and the network locations reachable from the Gitea server.

Exploit preconditions

  • Attack surface: Gitea features that process user-influenced URLs or other network destinations
  • Required access: Access sufficient to reach and invoke an affected feature; authentication requirements may vary by deployment
  • Trigger point: Server-side handling of a supplied or indirectly controlled destination
  • Why exploitation is possible: Destination validation may not adequately restrict requests to trusted schemes, hosts, ports, or network ranges

Why this happens

The underlying bug class is server-side request forgery, mapped to CWE-918. The application performs outbound network requests using destination data that is insufficiently constrained by trust boundaries or allowlists. This can cause the server to act as a proxy into networks and services that are not directly reachable by the requester.

Potential impact

  • The server may send requests to internal services
  • Cloud instance metadata or service credentials could be exposed
  • Internal administrative interfaces may be probed or accessed
  • Network segmentation controls could be weakened
  • Retrieved responses may disclose sensitive information

General mitigation guidance

Mitigation typically focuses on reducing control over outbound destinations and limiting the network authority of the application.

Common defensive patterns include:

  • Enforcing strict allowlists for permitted schemes, hosts, ports, and destinations
  • Blocking loopback, link-local, private, and otherwise reserved address ranges where they are not required
  • Revalidating destinations after hostname resolution and redirect processing
  • Disabling unnecessary outbound request functionality by default
  • Applying network egress controls and least-privilege service permissions
  • Avoiding reliance on client-side validation or hostname checks alone

How teams detect issues like this

Organizations commonly detect SSRF risks through:

  • Static analysis of server-side HTTP clients using user-controlled URLs
  • Code review checks for missing destination allowlists and redirect controls
  • Dynamic testing with internal, loopback, link-local, and controlled external destinations
  • Network monitoring for unexpected outbound requests from Gitea instances
  • Policy enforcement that restricts application egress to approved services

Automated security review tools may help identify data flows from request parameters into outbound network operations.

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-2fcr-jfvc-vgg2

Frequently asked

questions

It may be remotely exploitable through an affected Gitea feature when a requester can supply or influence the destination used for a server-side request.

Authentication requirements depend on the specific affected functionality and deployment configuration. The relevant prerequisite is access to an invocation path that processes attacker-influenced destinations.

Restrict outbound requests to explicitly approved destinations, validate the complete request flow including redirects and DNS resolution, and apply network-level egress controls.

Treat all externally influenced URLs as untrusted, use centralized SSRF-resistant request handling, test private and special-use address ranges, and grant the application only the network access it needs.

Find out what's already
exploitable in your codebase.