edx-enterprise SAML Metadata SSRF Vulnerability
edx-enterprise versions 7.0.2 through 7.0.4 are vulnerable to server-side request forgery (SSRF) via a SAML metadata URL in the `sync_provider_data` endpoint, allowing an authenticated Enterprise Admin to trigger arbitrary HTTP requests from the server.
The sync_provider_data endpoint in edx-enterprise is susceptible to a server-side request forgery (SSRF) vulnerability. An authenticated user with the Enterprise Admin role can set the metadata_source field in SAMLProviderConfig to an arbitrary URL via the SAMLProviderConfigViewSet PATCH endpoint. Subsequently, calling the sync_provider_data endpoint triggers a server-side HTTP request to the specified URL. The fetch_metadata_xml() function, responsible for fetching the metadata, lacks proper validation, including HTTPS enforcement, IP filtering, and request timeouts, leading to the vulnerability. This issue affects edx-enterprise versions 7.0.2 through 7.0.4 and was introduced when SAML admin viewsets were migrated from openedx-platform.
Attack Chain
- Attacker authenticates to the edx-enterprise instance as an Enterprise Admin.
- Attacker sends a PATCH request to the
SAMLProviderConfigViewSetto modify themetadata_sourceto a malicious URL (e.g.,http://169.254.169.254/latest/meta-data/iam/security-credentials/). - The server stores the malicious URL in the
SAMLProviderConfig.metadata_sourcefield. - Attacker sends a POST request to the
sync_provider_dataendpoint. - The
sync_provider_datafunction retrieves themetadata_sourceURL from theSAMLProviderConfig. - The
fetch_metadata_xmlfunction is called with the malicious URL. fetch_metadata_xmlusesrequests.get()to make an HTTP request to the attacker-controlled URL.- The server attempts to parse the (likely invalid) XML response. Even if parsing fails, the attacker has successfully triggered an SSRF.
Impact
Successful exploitation of this SSRF vulnerability allows an Enterprise Admin to perform several malicious actions: steal cloud credentials by accessing instance metadata services (AWS, GCP, Azure), scan internal networks by probing hosts and ports behind the firewall, and access internal APIs not exposed to the internet. This can lead to full compromise of the cloud infrastructure and sensitive data exposure.
Recommendation
- Apply the recommended patch by upgrading
edx-enterpriseto a version outside the range of >= 7.0.2, <= 7.0.4 to remediate CVE-2026-42860. - Implement egress filtering at the network level to block outbound connections from the Open edX server to
169.254.0.0/16and RFC 1918 ranges as mentioned in the advisory. - Deploy the Sigma rule “Detect Outbound Connection to AWS Metadata Endpoint” to monitor for connections to the AWS metadata service from the edx-enterprise server.
Detection coverage 2
Detect Outbound Connection to AWS Metadata Endpoint
highDetects outbound connections to the AWS metadata endpoint, which may indicate SSRF attempts.
Detect Modification of SAML Metadata Source via API
mediumDetects API calls that modify the SAML metadata source, potentially indicating an SSRF attempt.
Detection queries are kept inside the platform. Get full rules →
Indicators of compromise
1
url
| Type | Value |
|---|---|
| url | http://169.254.169.254/latest/meta-data/iam/security-credentials/ |