Severity:

HIGH RISK

(8.2)

Server-Side Request Forgery (CWE-918) in GitHub Enterprise Server Upload Endpoint

CVE-2026-9312

Modified

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal network resources and potential exposure of sensitive credentials

Severity:

HIGH RISK

(8.2)

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 (SSRF) vulnerability in GitHub Enterprise Server's upload endpoint allowed crafted requests to be routed to internal services due to insufficient input validation and path traversal handling.

An unauthenticated attacker could abuse this behavior to coerce the server into making internal API calls, which may expose sensitive credentials or internal service data when the upload functionality is reachable from untrusted networks.

Affected context

The vulnerability occurs in GitHub Enterprise Server instances that expose the affected upload endpoint to users or automated clients.

It manifests when user-controlled request parameters that influence internal request routing or destinations are not adequately sanitized, allowing path traversal elements to alter the intended request flow.

In deployments where the GitHub Enterprise Server host can reach internal APIs, metadata endpoints, or backing services, the SSRF can be used to target those internal resources.

Exploit preconditions

  • Attack surface: Publicly or internally accessible upload endpoint on GitHub Enterprise Server.
  • Required access: Network access to the endpoint; no authentication required under the described conditions.
  • Trigger point: Submission of a crafted upload request containing path traversal content or manipulated parameters that influence the internal request path or target.
  • Why exploitation is possible: The server reuses user-supplied request parameters to construct internal requests without robust normalization and validation, allowing path traversal to bypass intended routing and reach internal services.

Why this happens

This issue stems from the server treating user-controlled input as trustworthy when building internal requests.

Path traversal sequences and unvalidated parameters are allowed to influence the internal request path or target endpoint, enabling the attacker to redirect or repurpose the server's own HTTP client toward internal resources.

This maps to CWE-918: Server-Side Request Forgery (SSRF), where an application with broader network reach than the attacker becomes an involuntary proxy to internal networks and sensitive services.

Potential impact

  • An attacker may coerce the server into issuing requests to internal APIs or services that are not directly exposed to the internet.
  • Internal service metadata or configuration endpoints could be queried, potentially revealing service credentials, tokens, or other secrets.
  • The attacker can potentially enumerate internal hostnames or endpoints reachable from the GitHub Enterprise Server instance.
  • Depending on the internal services' behavior, this could enable lateral movement or further compromise of infrastructure.

General mitigation guidance

Effective mitigation focuses on constraining where and how server-side requests can be made and reducing trust in user-controlled input:

  • Introduce strict allowlists for all internal destinations that server-side components are permitted to contact, and reject or drop any request that falls outside these boundaries.
  • Normalize and strictly validate all path and URL-related parameters used to construct internal requests, removing or rejecting path traversal sequences and ambiguous encodings.
  • Decouple user input from low-level request construction by mapping user actions to predefined internal routes instead of passing user-supplied URLs or paths through directly.
  • Apply network-level segmentation and egress controls so that application components have minimal reachable internal services and cannot freely access metadata or management endpoints.
  • Limit the value and scope of credentials or tokens accessible via internal endpoints, and store sensitive secrets behind dedicated access-control and auditing layers.

How teams detect issues like this

Organizations can use a combination of code-level and operational strategies to detect SSRF patterns:

  • Static analysis rules that flag use of user-controlled variables in URL, host, or path construction for outbound HTTP requests.
  • Code review checklists that explicitly call out SSRF risks when developers introduce HTTP clients, proxy features, or upload/redirect endpoints.
  • Centralized HTTP client wrappers or service layers with built-in logging and enforcement of destination allowlists, making policy violations easier to detect.
  • Runtime monitoring of outbound traffic from GitHub Enterprise Server hosts, including anomaly detection for requests targeting internal IP ranges, metadata endpoints, or unexpected ports.
  • Use of automated security testing tools or DAST scanners configured to probe endpoints for SSRF behavior using controlled payloads and internal-canary URLs.

Sources

SourceLink
docs.github.comdocs.github.com/en/enterprise-server@3.17/admin/release-notes#3.17.17
docs.github.comdocs.github.com/en/enterprise-server@3.18/admin/release-notes#3.18.11
docs.github.comdocs.github.com/en/enterprise-server@3.19/admin/release-notes#3.19.8
docs.github.comdocs.github.com/en/enterprise-server@3.20/admin/release-notes#3.20.4
docs.github.comdocs.github.com/en/enterprise-server@3.21/admin/release-notes#3.21.2

Frequently asked

questions

Exploitability depends on the exposure of the upload endpoint and the internal network topology. If the endpoint is reachable without strong network controls and the GitHub Enterprise Server instance can reach sensitive internal services, the SSRF can have a wide impact; in more isolated deployments, the blast radius is narrower.

Under the described conditions, no authentication is required; an unauthenticated attacker with network access to the vulnerable endpoint can attempt exploitation. However, real-world risk is still gated by firewalls, VPNs, and other access controls that limit who can reach the server.

The most robust pattern combines strict destination allowlists, normalization of paths, and hard separation between user input and outbound HTTP request construction. Application code should translate user intents into predefined internal calls rather than accepting arbitrary URLs or paths.

Establish SSRF-focused secure coding guidelines, centralize outbound HTTP logic behind vetted libraries or service clients, and enforce validation policies through code review and automated checks. Complement this with network-layer controls that limit what internal resources application servers can contact, so even overlooked SSRF paths have reduced impact.

Find out what's already
exploitable in your codebase.