/

CVE-2026-42858

Severity:

HIGH RISK

(8.5)

SSRF in Open edX SAML Provider Sync Endpoint

CVE-2026-42858

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal services and sensitive metadata via server-side HTTP requests

Severity:

HIGH RISK

(8.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) flaw in the Open edX SAML provider sync endpoint allows authenticated Enterprise Admin users to supply an arbitrary URL that the server will fetch.

By abusing the metadata_url parameter, an attacker can coerce the Open edX server into making HTTP requests to internal services, cloud metadata endpoints, or attacker-controlled hosts, potentially exposing sensitive information or expanding their reach within the environment.

Affected context

This issue affects Open edX deployments that expose the SAMLProviderDataViewSet sync_provider_data endpoint to authenticated Enterprise Admin users.

The vulnerability arises when the backend:

  • Accepts a metadata_url value from the client
  • Passes that URL directly into requests.get() (or equivalent HTTP client)
  • Does not enforce URL scheme restrictions, destination allowlists, or internal IP blocking

It is most relevant in environments where the Open edX application server can reach internal network resources, cloud provider metadata services, or other sensitive HTTP endpoints.

Exploit preconditions

  • Attack surface: HTTP API endpoint sync_provider_data on SAMLProviderDataViewSet.
  • Required access: Valid Open edX Enterprise Admin account (authenticated with sufficient permissions to invoke the endpoint).
  • Input control: Ability to submit arbitrary metadata_url values in a POST request body.
  • Network conditions: The Open edX server has network access to internal services, cloud metadata URLs (e.g., 169.254.169.254), or other restricted HTTP endpoints.
  • Why exploitation is possible: The server trusts client-supplied URLs and forwards them unvalidated to requests.get(), with no URL parsing safeguards, IP filtering, or scheme enforcement, allowing the attacker to pivot through the server's network position.

Why this happens

The root cause is an insecure design pattern where user-controlled URLs are used as direct inputs to server-side HTTP requests without validation or restriction.

In this case, the sync_provider_data endpoint accepts a metadata_url parameter and passes it directly to fetch_metadata_xml(), which calls requests.get() without:

  • Verifying that the URL belongs to a trusted domain or host
  • Restricting access to link-local, loopback, or private IP ranges
  • Enforcing safe schemes such as HTTPS-only

This maps to CWE-918: Server-Side Request Forgery (SSRF), where the server acts as an unintended proxy, allowing an attacker to interact with internal or otherwise non-public resources by leveraging the application's network context.

Potential impact

  • Access to internal HTTP services that are not directly exposed to the internet (e.g., admin consoles, internal APIs, monitoring endpoints).
  • Retrieval of cloud instance metadata (e.g., AWS 169.254.169.254), which can include temporary credentials, instance details, or configuration secrets.
  • Discovery of internal network structure and reachable services through timing, error messages, or response content.
  • Use of the application server as a pivot point for further attacks (e.g., targeting internal admin APIs that trust the server's IP).
  • Potential exposure of sensitive configuration, logs, or service-specific tokens returned by internal endpoints.

General mitigation guidance

Mitigation typically focuses on constraining where the server is allowed to send outbound HTTP requests and de-coupling user input from raw network operations.

Common defensive patterns include:

  • Strict allowlisting: Only permit outbound requests to a curated set of trusted domains or specific SAML IdP endpoints, resolving and validating hostnames before making the request.
  • Network-zone restrictions: Block access to link-local, loopback, private, and multicast address ranges at the application or network layer, especially 169.254.169.254 and similar metadata endpoints.
  • Scheme enforcement: Restrict accepted URLs to safe schemes (e.g., https) and explicitly reject others (http, file, gopher, etc.).
  • Decoupled configuration: Prefer server-side configuration for SAML metadata sources instead of accepting arbitrary URLs from user input, especially for privileged workflows.
  • Least privilege networking: Deploy application servers in segmented networks and minimize their ability to directly reach high-value internal services or management planes.

How teams detect issues like this

Detection efforts can focus on both code-level analysis and runtime behavior:

  • Static analysis and code review:
  • Search for calls to HTTP clients (e.g., requests.get, requests.post) where the URL or host is derived from request data or other untrusted input.
  • Flag endpoints that accept arbitrary URLs or hostnames without validation, especially in privileged admin APIs.
  • Check for the absence of allowlists, scheme checks, or IP range filters around outbound requests.
  • Security testing and dynamic analysis:
  • Use application security testing tools to probe endpoints that accept URLs, observing their ability to reach internal or reserved IP ranges.
  • Monitor application logs for unusual outbound requests, such as those targeting 127.0.0.1, 169.254.169.254, or RFC1918 private ranges.
  • Policy and tooling:
  • Establish internal guidelines discouraging direct use of user-supplied URLs in server-side HTTP requests.
  • Integrate automated code scanning or SAST tools that include SSRF-specific rules into CI pipelines to catch patterns early.

Sources

SourceLink
github.comgithub.com/openedx/openedx-platform/commit/6fda1f120ff5a590d120ae1180185525f399c6d0
github.comgithub.com/openedx/openedx-platform/commit/70a56246dd9c9df57c596e64bdd8a11b1d9da054
github.comgithub.com/openedx/openedx-platform/security/advisories/GHSA-328g-7h4g-r2m9

Frequently asked

questions

It is exploitable by any remote user who has valid Enterprise Admin credentials and access to the sync_provider_data endpoint. The attacker does not need direct network connectivity to internal services; they instead leverage the Open edX server as a proxy to reach those resources.

The attacker must be an authenticated Enterprise Admin in the Open edX instance. Regular learners or unauthenticated users cannot exploit this endpoint as described, but the impact can still be significant because Enterprise Admins may be more numerous than fully trusted infrastructure administrators.

The safest pattern is to avoid making arbitrary outbound requests based on user-controlled URLs. When external metadata or configuration must be fetched, define trusted endpoints in server-side configuration, enforce strict destination allowlists and scheme checks, and block access to internal IP ranges and metadata services.

Treat all URLs and hosts derived from client input as untrusted. Implement standardized helpers for outbound HTTP calls that perform host validation, IP range blocking, and scheme enforcement. Combine this with security-focused code review, static analysis rules for SSRF patterns, and network-layer controls that limit which destinations application servers can reach.

Find out what's already
exploitable in your codebase.