/

CVE-2026-77987

Severity:

CRITICAL RISK

(9.8)

SSRF (CWE-918) in GitHub Enterprise Server Notebook Viewer

CVE-2026-77987

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-208, CWE-918

Impact:

Internal Service Access, Secret Disclosure, and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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 the GitHub Enterprise Server notebook viewer allowed attacker-controlled URLs to reach internal services on ports that were not properly validated.

Although response bodies were not exposed directly, response timing could reveal instance secrets character by character. Those secrets could then support remote code execution through a separate internal service interaction.

Affected context

The issue occurs in GitHub Enterprise Server deployments where the notebook viewer processes user-supplied URLs and validates the URL scheme and host without adequately restricting the destination port. Exploitation depends on network access to the appliance and is more broadly reachable when private mode is disabled; when private mode is enabled, an authenticated user may be required.

Exploit preconditions

  • Attack surface: Notebook viewer URL-fetching functionality
  • Required access: Network access to the GitHub Enterprise Server instance; authentication requirements depend on private-mode configuration
  • Trigger point: Processing a user-supplied URL through the notebook viewer
  • Why exploitation is possible: Host and scheme checks do not sufficiently constrain the destination port, allowing requests to internal services. Response timing can act as a side channel for inferring secret values even when response bodies are not returned.

Why this happens

The vulnerability results from incomplete server-side URL validation. The application checks selected URL components but fails to enforce an appropriate port or internal-service destination policy, allowing attacker-controlled requests to reach unintended services.

This maps primarily to CWE-918: Server-Side Request Forgery, because the server is induced to make requests to attacker-selected internal destinations. The timing-based secret extraction behavior is also associated with CWE-208: Observable Timing Discrepancy, where measurable processing differences disclose information.

Potential impact

  • An attacker may probe internal services running on the appliance
  • Response timing could disclose instance secrets character by character
  • Obtained secrets could enable access to privileged internal functionality
  • The appliance may be exposed to remote code execution through a separate internal service
  • Confidentiality, integrity, and availability of the enterprise instance could be affected

General mitigation guidance

Mitigation generally focuses on treating all user-supplied URLs as untrusted and enforcing destination controls before any server-side request is made.

Common defensive patterns include:

  • Enforcing an explicit allowlist of schemes, hosts, ports, and network destinations
  • Blocking loopback, link-local, private, management, and appliance-internal address ranges
  • Resolving and validating destinations after DNS resolution, while preventing rebinding bypasses
  • Applying outbound network segmentation and egress filtering to restrict access to internal services
  • Avoiding secret-dependent response timing and using constant-time or uniform-result handling where feasible
  • Minimizing the privileges and network reach of the notebook viewer process
  • Keeping sensitive internal services inaccessible from general-purpose request handlers

How teams detect issues like this

Organizations can look for SSRF indicators and incomplete URL validation through:

  • Static analysis rules identifying server-side HTTP clients fed by user-controlled URLs
  • Code review checks for validation that omits ports, resolved addresses, redirects, or DNS-rebinding behavior
  • Tests covering loopback, private address space, link-local destinations, alternate ports, redirects, and encoded host representations
  • Egress firewall and proxy policies that deny unexpected connections from the appliance to internal services
  • Monitoring for unusual outbound requests from the notebook viewer and repeated timing-based probing patterns
  • Security testing that evaluates whether response timing varies based on secret-dependent internal behavior

Sources

SourceLink
docs.github.comdocs.github.com/en/enterprise-server@3.17/admin/release-notes#3.17.21
docs.github.comdocs.github.com/en/enterprise-server@3.18/admin/release-notes#3.18.15
docs.github.comdocs.github.com/en/enterprise-server@3.19/admin/release-notes#3.19.12
docs.github.comdocs.github.com/en/enterprise-server@3.20/admin/release-notes#3.20.8
docs.github.comdocs.github.com/en/enterprise-server@3.21/admin/release-notes#3.21.6
docs.github.comdocs.github.com/en/enterprise-server@3.22/admin/release-notes#3.22.1

Frequently asked

questions

Yes. Exploitation requires network access to the GitHub Enterprise Server instance. It may be unauthenticated when private mode is disabled; private mode may require any authenticated user.

No. The SSRF behavior causes the appliance to make requests to internal destinations. Timing differences can provide information even when the internal response body is not returned.

Enforce strict allowlists for URL schemes, hosts, ports, resolved addresses, and redirect targets, combined with outbound network restrictions and uniform handling of secret-dependent operations.

Treat every user-controlled URL as untrusted, test all URL components and resolution paths, restrict appliance egress, protect internal services with authentication and authorization, and monitor for anomalous outbound request and timing-probe activity.

Find out what's already
exploitable in your codebase.