Severity:

HIGH RISK

(8.9)

SSRF in GitHub Enterprise Server Notebook Rendering

CVE-2026-5921

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Exposure of sensitive information from internal services and environment variables via unauthenticated SSRF and timing side-channel

Severity:

HIGH RISK

(8.9)

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 notebook rendering service allowed unauthenticated attackers to coerce the server into making HTTP requests to internal services and infer sensitive environment variables via a timing side-channel.

When private mode was disabled, notebook rendering would follow redirects without revalidating destination hosts, enabling chained redirects through an open redirect endpoint to internal APIs whose response times leaked secret values character by character.

Affected context

This issue arises in GitHub Enterprise Server deployments where:

  • The instance is running with private mode disabled, exposing notebook rendering to unauthenticated users
  • The notebook viewer follows HTTP redirects without enforcing strict host validation
  • An internal API supports regex-based filtering or similar query operations whose performance depends on the queried value
  • An open redirect endpoint on the instance can be chained with external redirects

In such environments, the notebook rendering service effectively acts as an internal HTTP client reachable from the internet, bridging external attacker traffic to internal services and metadata.

Exploit preconditions

  • Attack surface: Public-facing GitHub Enterprise Server notebook rendering endpoint, reachable over HTTP/HTTPS when private mode is disabled.
  • Required access: No authentication required; attacker only needs network access to the instance and the ability to craft notebook content or URLs that the viewer processes.
  • Trigger point: Rendering a notebook that embeds or references a URL which causes the notebook viewer to follow redirects ending at internal services.
  • Redirect behavior: The notebook service follows HTTP redirects and does not revalidate the final destination host against an allowlist or internal-only restriction.
  • Open redirect chaining: The instance exposes an open redirect endpoint that can be used as an intermediate step to pivot from external URLs to internal ones.
  • Why exploitation is possible: Because redirects are followed without host revalidation and internal responses are observable via timing differences, an attacker can mount a blind SSRF and timing side-channel to infer sensitive environment values bit by bit.

Why this happens

The core issue maps to CWE-918: Server-Side Request Forgery (SSRF).

The notebook rendering service behaves as an HTTP client that:

  • Accepts attacker-controlled URLs, directly or indirectly via notebook content
  • Follows HTTP redirects without enforcing strict host or scheme validation on the final target
  • Operates in a privileged network position with access to internal services and environment-derived configuration

This design implicitly trusts redirect chains and lacks a robust boundary between external content and internal network resources. The internal API's regex-based query behavior provides a measurable timing signal tied to secret-dependent processing. The combination of:

  • Unvalidated redirect following (SSRF pattern)
  • Open redirect endpoints
  • Data-dependent timing in internal APIs

enables a timing side-channel that leaks secret values character by character, even though the attacker cannot see the response content directly.

Potential impact

  • Extraction of sensitive environment variables (such as API keys, tokens, or configuration secrets) through timing-based inference
  • Discovery of internal service endpoints, hostnames, or topology by probing internal HTTP services
  • Use of secrets obtained from the environment to further compromise the GitHub Enterprise Server instance or integrated systems
  • Potential lateral movement to other internal applications reachable from the server
  • Increased attack surface for chaining with other vulnerabilities (e.g., authentication bypasses or misconfigurations in internal APIs)

General mitigation guidance

Effective mitigation typically focuses on hardening outbound requests, controlling redirect behavior, and reducing side-channel leakage:

  • Restrict SSRF-capable clients:
  • Treat notebook rendering and similar services as high-risk HTTP clients.
  • Enforce strict egress policies: block access to link-local, metadata, loopback, and internal address ranges unless absolutely required.
  • Enforce host and scheme validation:
  • Validate the final destination host, scheme, and port after all redirects, not just the initial URL.
  • Maintain explicit allowlists for external hosts that notebook rendering is allowed to contact.
  • Eliminate or constrain open redirects:
  • Remove open redirect endpoints where feasible, or constrain them to a fixed set of allowed targets.
  • Validate redirect targets against a canonical set of trusted domains.
  • Harden internal APIs:
  • Design internal APIs so that query performance does not vary strongly or predictably with secret-dependent conditions.
  • Avoid regex filters or expensive operations that can be tuned to amplify timing differences for secret guessing.
  • Network segmentation and least privilege:
  • Place the notebook rendering component in a network segment with minimal access to internal services and no direct access to sensitive metadata endpoints where possible.
  • Limit environment exposure within the process and avoid storing secrets as process-wide environment variables when other secret management options exist.

How teams detect issues like this

High-level detection and monitoring approaches can include:

  • Static and configuration analysis:
  • Scan code and configuration for HTTP clients that:
  • Accept user-controlled URLs or content
  • Follow redirects automatically
  • Lack host or IP range validation
  • Flag open redirect routes and review their usage in the context of internal HTTP calls.
  • Code review signals:
  • Pay attention to components that:
  • Perform server-side rendering of user content (e.g., notebooks, markdown, previews)
  • Construct URLs from user input or parse external links
  • Call internal APIs from outward-facing paths
  • Look for absence of egress filtering and missing checks on redirect targets.
  • Runtime monitoring:
  • Monitor outbound HTTP traffic from the GitHub Enterprise Server instance, especially to unusual IP ranges or hostnames not expected in normal operation.
  • Alert on patterns of repeated, structured requests to internal endpoints that vary slightly and appear timing-probe-like.
  • Policy enforcement and automated tools:
  • Use security linters and SAST tools configured with SSRF-focused rules (e.g., detection of unvalidated redirects, user-controlled URLs in outbound requests).
  • Integrate SSRF and open-redirect checks into CI/CD pipelines and infrastructure-as-code review.

Sources

SourceLink
docs.github.comdocs.github.com/en/enterprise-server@3.14/admin/release-notes#3.14.26
docs.github.comdocs.github.com/en/enterprise-server@3.15/admin/release-notes#3.15.21
docs.github.comdocs.github.com/en/enterprise-server@3.16/admin/release-notes#3.16.17
docs.github.comdocs.github.com/en/enterprise-server@3.17/admin/release-notes#3.17.14
docs.github.comdocs.github.com/en/enterprise-server@3.18/admin/release-notes#3.18.8
docs.github.comdocs.github.com/en/enterprise-server@3.19/admin/release-notes#3.19.5
docs.github.comdocs.github.com/en/enterprise-server@3.20/admin/release-notes#3.20.1

Frequently asked

questions

Exploitation is constrained to deployments with private mode disabled, but in that configuration it is reachable by unauthenticated attackers with network access to the instance. It does not require user interaction beyond the attacker inducing notebook rendering with crafted URLs.

No. When private mode is disabled, the vulnerable notebook rendering surface is accessible without authentication, so an attacker can exploit the SSRF and timing side channel anonymously.

The most robust fix pattern is to treat notebook rendering as an untrusted HTTP client: enforce strict allowlists for outbound hosts, validate the final redirect target after all redirects, remove or strictly constrain open redirects, and minimize internal service and environment exposure to that component.

Preventing similar issues requires designing external-facing services with SSRF in mind: avoid making arbitrary outbound requests based on user input, implement strong egress and host validation controls, regularly review and eliminate open redirects, and ensure internal APIs do not leak secrets through timing or other side channels that can be triggered by external clients.

Find out what's already
exploitable in your codebase.