/

CVE-2026-32236

Severity:

HIGH RISK

(7.5)

SSRF in Backstage Auth Backend CIMD Metadata Fetch

CVE-2026-32236

Modified

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Limited Server-Side Request Forgery against internal endpoints

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 (SSRF) issue in Backstage's @backstage/plugin-auth-backend can occur when the experimental auth.experimentalClientIdMetadataDocuments.enabled flag is turned on.

The plugin validates the initial client_id hostname but fails to re-validate after HTTP redirects, which may allow an attacker to induce limited internal HTTP requests under specific configuration conditions.

Affected context

This vulnerability appears in Backstage deployments using the @backstage/plugin-auth-backend plugin with the experimental auth.experimentalClientIdMetadataDocuments.enabled feature explicitly enabled.

It affects the Client ID Metadata Documents (CIMD) metadata fetch logic, which:

  • Accepts a client_id whose hostname is validated against private IP ranges for the initial request
  • Follows HTTP redirects without performing the same private IP range validation on the redirect target

Environments that configure allowedClientIdPatterns to restrict client_id values to specific trusted domains are effectively protected against this issue.

Exploit preconditions

  • Attack surface: The Backstage auth backend endpoint that processes client_id metadata documents (CIMD).
  • Required access: Ability to supply or influence a client_id value that triggers the metadata fetch (e.g., through an OAuth/OIDC or auth-related integration flow).
  • Configuration requirements:
  • auth.experimentalClientIdMetadataDocuments.enabled must be set to true.
  • The deployment must not restrict allowedClientIdPatterns strictly to trusted domains.
  • Trigger point: The backend performs an HTTP request to fetch metadata for the supplied client_id, follows redirects, and fails to re-validate the redirect URL against private IP ranges.
  • Why exploitation is possible: Validation of the destination host is only performed on the initial URL. Redirect responses can point to internal IP addresses or internal hostnames, and the backend follows these redirects without repeating the private network checks, enabling limited SSRF.

Why this happens

The underlying flaw is an incomplete validation of server-side HTTP requests in the presence of redirects.

The CIMD metadata fetch correctly checks the initial client_id host against private IP ranges but does not repeat the same validation once an HTTP redirect is encountered.

This aligns with CWE-918: Server-Side Request Forgery (SSRF), where an application makes outbound requests based on user-controlled input without fully constraining all eventual destinations.

The insecure pattern is: input-derived URLs are partially validated only at the first hop, and subsequent redirect targets are implicitly trusted, creating a gap between intended network access policy and actual request behavior.

Potential impact

  • The backend may send HTTP requests to internal services or metadata endpoints that are not normally exposed to external users.
  • Internal network reachability can be probed indirectly (e.g., via timing, error messages, or success/failure behavior), enabling limited network scanning.
  • Certain internal endpoints that perform side effects on simple HTTP requests could be triggered, subject to the fixed method and headers.
  • In multi-tenant or complex environments, this could assist an attacker in mapping portions of the internal network topology.

General mitigation guidance

Effective mitigation focuses on tightening outbound request validation and reducing trust in client-controlled identifiers:

  • Apply consistent host and IP range validation on every outbound request, including after HTTP redirects, not just on the initial URL.
  • Enforce strict allowedClientIdPatterns so that client_id values are constrained to a small set of trusted domains that are under organizational control.
  • Consider disabling experimental features such as auth.experimentalClientIdMetadataDocuments.enabled unless there is a clear operational need and they are reviewed for security implications.
  • Introduce allowlist-based egress control at the application or network layer so that backend components can only reach known, explicitly approved hosts.
  • Use conservative redirect-following policies (e.g., limit the number of redirects or disallow redirects to different hostnames or schemes) for security-sensitive metadata fetches.

How teams detect issues like this

Detection can be approached through both code-centric and operational techniques:

  • Static analysis and code review:
  • Look for HTTP client usage that follows redirects automatically when the target URL is derived from user or configuration input.
  • Flag patterns where initial URL validation (e.g., private IP checks) is performed without equivalent checks on redirect destinations.
  • Review auth and metadata-related code paths for network calls that do not enforce strict domain allowlists.
  • Automated tooling:
  • Configure SAST tools to detect potential SSRF sinks (HTTP clients, URL fetchers) where input validation is incomplete or absent.
  • Use dependency-aware scanners to highlight plugins or modules that initiate outbound requests based on client identifiers.
  • Runtime monitoring:
  • Monitor egress traffic from the auth backend component for unexpected destinations, especially internal IP ranges or non-standard services.
  • Implement logging for metadata fetches, including request targets, redirect chains, and response status codes, and alert on access to internal-only ranges.

Sources

SourceLink
github.comgithub.com/backstage/backstage/commit/17038abf2dfdb4abc08a59b1c95af39851de0e07
github.comgithub.com/backstage/backstage/security/advisories/GHSA-qp4c-xg64-7c6x

Frequently asked

questions

The practical impact is limited. While an attacker may be able to induce internal HTTP requests via redirects, they cannot read the response body, cannot set custom headers or HTTP methods, and the feature is disabled by default. Additionally, deployments that tightly restrict allowedClientIdPatterns to trusted domains are not affected.

The attacker must be able to influence the client_id used by the auth backend's CIMD metadata fetch. This typically means they already participate in an authentication or integration flow that permits providing or controlling a client_id.

The most robust fix is to treat every outbound HTTP request as untrusted, validating destination hosts and IP ranges at each step of the redirect chain. Combined with strict allowlists (e.g., allowedClientIdPatterns or outbound domain allowlists), this ensures that user-controlled identifiers can only ever resolve to explicitly approved hosts.

Prevention generally includes: designing outbound network calls around allowlists rather than blocklists; enforcing consistent validation across redirects; limiting or disabling automatic redirect following for sensitive fetches; and incorporating SSRF-specific checks into code review, threat modeling, and static analysis policies for all components that make HTTP requests based on external input.

Find out what's already
exploitable in your codebase.